Header name must be a valid HTTP token

Morning all.
Quick/dumb question that I cant seem to find an answer for.

I’m using Windows 10 Postman app v7.25.2, to try to hit a 3rd party api that I have no control over.
The 3rd party api needs certain header fields that begin with a colon ‘:’, eg “:authority”.

However, Postman wont let me send a request with that header since its (correctly) considered an invalid header when containing the colon. The console error is:
Error: Header name must be a valid HTTP token [":authority"]

So the question is: is there any way I can override this checking behavior in Postman to let the request through. I cannot change the 3rd party api.

I’m sure I’m not the first to hit this issue but can’t find anything here or much via google.

Thanks in adv

1 Like

Did you find any solution ?

nope, and I guess there’s no easy answer because there’s no other replies to my post :slight_smile:

Colon is an invalid character for the HTTP header as per HTTP standards given in RFC822.

There is a discussion on stack overflow regarding acceptable characters in HTTP headers.

Postman is throwing an error for header key “:authority” as it is failing the validation for the acceptable HTTP header.

Hope this helps :slight_smile:

Yep, I understand that much already. For me it would’ve been handy to have been able to override that behaviour in Postman though :slightly_smiling_face:

The big issue here is with Pseudo-Headers that are used in http/2. They are valid in that spec for specific headers :authority being one of them. Postman does not support http/2.