Closed jfock closed 7 years ago
I will look into the Accept
issue, but the exception is because there is no encoder installed for the content type (see Request Encoders).
Actually, the Accept-Charset
header you would need to specify yourself. In the case of request.charset
that is actually supposed to set the charset used in the Content-Type
header, which it does not do currently, but I am fixing. I will also update the docs to reflect this.
Unless I am misunderstanding something the Accept-Content
type header is not tied to the request content-type at all, but rather the response content-type.
I found some talk that the application/json
content type does not allow charset to be specified or at least does not care; however, the fixed code (coming in the next release) will still handle it properly.
The missing charset in the content-type issue is resolved in the development
branch. The missing Accept-Charset
is not an issue.
Hi @cjstehno I am trying to do a multipart/form-data request to one of our servers. There is an owasp modsecurity firewall in-front and it is rejecting our request because of the charset specified in Content-type header, with following message:
ModSecurity: Multipart parsing error (init): Multipart: Invalid boundary in C-T (characters)
Is it possible to not include charset at all in Content-Type header or it is always appended?
Btw HttpBuilder-ng is awesome, we have created a DSL for testing and it complements the HttpBuilder-ng.
I´m trying to send a POST request with UTF-8 accepted/encoded content and according to the documentation
should set the Accept-Charset header, but it´s not:
Same result with the Java client.
Not sure if this is the proper way to send such an request, with the old http-builder it was sufficient to set header 'Content-Type: application/json;charset=UTF-8' but when doing it with this client I get an exception
Thanks!