[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-1506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Oleg Kalnichevski resolved HTTPCLIENT-1506.
-------------------------------------------

    Resolution: Invalid

{code:java}
Request req = Request.Post(getAidaServiceUrl().toString());
req.bodyForm(Form.form().add("text", text, Consts.UTF_8).build());
{code}

Hope this helps

Oleg

> Including "; charset=..." in the content type header prevents form fields 
> from getting transmitted?
> ---------------------------------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1506
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1506
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: Fluent HC, HttpClient
>    Affects Versions: 4.3.2
>            Reporter: John Smitany
>
> Running the following code works
> Request req = Request.Post(getAidaServiceUrl().toString());
> req.addHeader("Content-Type","application/x-www-form-urlencoded");
> req.bodyForm(Form.form().add("text", text).build()); 
> but the text will be transferred in iso-8859-1. However changing the second 
> line to 
> eq.addHeader("Content-Type","application/x-www-form-urlencoded; 
> charset=UTF-8");
> completely prevents the text to get transferred to the server. 
> There should be a way to easily send UTF-8 somehow.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to