Open GoogleCodeExporter opened 9 years ago
is there a solution for this yet? thanks!
Original comment by javierco...@gmail.com
on 14 Oct 2014 at 2:01
I would also like to know how to solve this please.
Original comment by pb...@york.ac.uk
on 16 Feb 2015 at 6:39
I found a solution to this by encoding the request as follows:
<code>
...
final HttpClient client = new HttpClient();
final PostMethod method = new PostMethod("...service url...");
method.addRequestHeader("X-HTTP-Method-Override", "GET");
final Part[] parts = {
new StringPart("key", "...my key...", "UTF-8"),
new StringPart("source", "ja", "UTF-8"),
new StringPart("target", "en", "UTF-8"),
new StringPart("q", "...japanese content...", "UTF-8")
};
method.setRequestEntity(new MultipartRequestEntity(parts, method.getParams()));
InputStream responseIS = method.getResponseBodyAsStream();
...
</code>
Hope this helps!
Javier C.
Original comment by javierco...@gmail.com
on 16 Feb 2015 at 9:07
Original issue reported on code.google.com by
taninam...@gmail.com
on 29 Jun 2014 at 6:41