Campoie / rest-assured

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

Avoid 406 Not acceptable #10

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
when doing e.g.:
expect().body("something").when().get("/admin");

and /admin has content-type of application/xml we force text parsing by setting 
the content-type header. This is bad because the server can then respond with a 
406. What we should do is to change parser 
(http://groovy.codehaus.org/modules/http-builder/doc/contentTypes.html) by:

http.parser.'application/xml' = http.parser.'text/plain'
http.parser.'application/json' = http.parser.'text/plain'

etc.

Original issue reported on code.google.com by johan.ha...@gmail.com on 13 Jan 2011 at 8:05

GoogleCodeExporter commented 9 years ago

Original comment by johan.ha...@gmail.com on 12 Feb 2011 at 10:24