question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to send custom headers for Http Request

See original GitHub issue

I 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:closed
  • Created 4 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Huachaocommented, Jan 13, 2020

@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 in httpbin.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.

0reactions
strings-codecommented, Jan 13, 2020

thanks @Huachao for your help.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found