How to send cyrillic / finish characters in http header

2.1k Views Asked by At

I want to send custom http header to a java http server with "ä ö å Ä Ö Å" as the value. But what is received by server is "ä ö Ã¥ à à Ã". If I add "ä ö å Ä Ö Å" in http body, it works fine. How do I send "ä ö å Ä Ö Å" in http header.

I use curl as the http client. I used postman but when the header is added, it does not even send the request.

1

There are 1 best solutions below

0
On

1) Non-ASCII characters in HTTP header fields are discouraged and may break on the wire. You may want to escape them (percent-encoding or something like that).

2) What your server sees is apparently is UTF-8. Your server will need to decode that.