2

I'm trying to make a GET request in Postman where one of my header parameters has an UTF-8 encoded character like so:

Headers
key: Location      Value: Jcareí

All the requests that I made with this header end up giving me a 400 - Bad Request.

If I just remove the í character everything works just fine.

I've already tried to set the Content-type to application/json;charset=UTF-8 and disabling the Accept-Encoding as suggested here, but none of these seems to work.

What am I missing here?

Ken White
  • 123,280
  • 14
  • 225
  • 444
Rogerio Schmitt
  • 1,055
  • 1
  • 15
  • 35
  • The `application/json` content type does not have a charset. It is always implicit UTF-8. The `charset`param is ineffective. – Michael-O Apr 27 '21 at 12:15
  • 1
    TL;DR: you can't send non-ASCII text in HTTP headers, there's simply no standard for it. You can *encode* the header in whatever ASCII-compatible encoding you want (e.g. base64 or percent-encoding), as long as the client and the server can agree on that same convention. – deceze Apr 27 '21 at 12:27

0 Answers0