How to send custom headers for Http Request
See original GitHub issueI am using Rest Client for the first time and when I send custom header like below in Https, the service response comes back saying that the request is missing MY-CUSTOM-HEADER. It makes me think that the custom header is not being sent, any special requirement to specify custom header? Thank you.
`POST https://example.com/abc/1.0/ HTTP/1.1 Content-Type: application/json Authorization: Bearer OGafjutE2QGd81z3BJ2Lpuu2suzaa6L3d5h8OTEUZ6S0GXdXMJqV0P MY-CUSTOM-HEADER: {“Id”: “132182”, “productId”: “ABC”, “appVersion”: “1.0”}
{ “transferabilityData”: { “fundFamilyNbr”: 1234 } } `
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
How do I send GET Request with Custom Headers? - ReqBin
To send a GET request with custom HTTP headers, you must provide custom headers in the "Name: Value" format, just like the standard...
Read more >Custom HTTP Headers - KeyCDN Support
Custom HTTP headers are commonly meant to provide additional information that may be pertinent to a web developer, or for troubleshooting ...
Read more >HTTP headers - MDN Web Docs - Mozilla
Request headers contain more information about the resource to be fetched, or about the client requesting the resource. · Response headers hold ...
Read more >Requests with custom HTTP headers - Progress Documentation
To use custom headers, you must define the request in the Model file. The Model file entry is comprised of a path and...
Read more >Add Custom Headers to HTTP Requests | Fusion 5.7
Add Custom Headers to HTTP Requests · Click Indexing > Datasources. · Click Add+, then Web. · Enter a datasource ID and a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@stegano I think the Node.js (my extension relies on) internal behavior is consistent with the spec that HTTP request headers are case-insensitive. And the actual outgoing headers are all lowercased, instead of the
Pascal
case. The Pascal case displayed inhttpbin.org/get
is handled by that site internally. You can verify this by using Fiddler.And this is an upstream limit from Node.js that it doesn’t retain the header case, I am afraid that no ways to workaround. However, I think this behavior makes sense.
thanks @Huachao for your help.