Closed GoogleCodeExporter closed 9 years ago
Hi,
This was indeed a quite serious bug! I've fixed it in trunk now and you can see
if it works for you if you depend on 1.6.2-SNAPSHOT after having added the
snapshot repo:
<repositories>
<repository>
<id>sonatype</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<snapshots />
</repository>
</repositories>
Also bare in mind that if you want to make sure that your request body is
indeed going to use UTF-8 you need to supply the charset to the content-type
header OR configure it as the default request content charset using the
detailed configuration in REST Assured (search for it on the usage page).
Original comment by johan.ha...@gmail.com
on 26 Apr 2012 at 7:54
Hi,
Thank you very much for the quick turn around! I've verified that
1.6.2-SNAPSHOT does resolve the issue. For future readers the charset point is
an important one. To that end, I've verified that this mechanism can be used
to control that...
given().contentType("text/plain; charset=UTF-8").body( "TEST".getBytes( "UTF-8"
) ).when().post( "http://localhost:8888/test" );
This produces the expected HTTP request...
POST /test HTTP/1.1
Accept: */*
Content-Length: 4
Content-Type: text/plain; charset=UTF-8
Host: localhost:8888
Connection: Keep-Alive
Accept-Encoding: gzip,deflate
TEST
Original comment by kmin...@gmail.com
on 26 Apr 2012 at 2:51
Original issue reported on code.google.com by
kmin...@gmail.com
on 23 Apr 2012 at 6:09