Campoie / rest-assured

Automatically exported from code.google.com/p/rest-assured
0 stars 0 forks source link

Use a default body encoder for unregisterd content types #98

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Today you'll run into a NPE in HTTPBuilder when mixing a request body and a 
custom content type, e.g.

given()
            .cookie("cookiearg 1", "cookiearg2")
        .cookie("cookiearg 3", "cookiearg4")
            .body("{ \"message\" : \"hello world\"}")
        .with()
            .contentType("application/CustomMediaType")
        .then()
        .expect()
            .statusCode(200)
        .when()
            .post("/acceptHelloWorld");

To avoid the NPE we a default encoder should be used, e.g. the same as the JSON 
encoder.

Original issue reported on code.google.com by johan.ha...@gmail.com on 4 Sep 2011 at 8:32

GoogleCodeExporter commented 9 years ago

Original comment by johan.ha...@gmail.com on 5 Sep 2011 at 6:19