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.

Header name must be a valid HTTP token ["{"]

See original GitHub issue

I had a previous simple test file that was working I tried to add a couple of requests in the same file but now I just get the error above on any request…

I tried reverting any changes to the .http file but still the extension just gives this invalid error each time i try to load a resource.

  • VSCode Version: Version: 1.38.1

  • OS Version: OSX 10.14.6

  • REST Client Version: 0.22.2

Steps to Reproduce:

  1. make a file with some simple tests like
POST http://localhost:55200/test HTTP/1.1
content-type: application/json
{
    "cname": "weile"
}

all will work fine. wait a while. do something? then error occurs:

  1. try and run click ‘send request’

error message pops up as toast.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:17
  • Comments:21 (2 by maintainers)

github_iconTop GitHub Comments

296reactions
dcsancommented, Oct 6, 2019

OK looks like the error is:

POST http://localhost:55200/test HTTP/1.1
content-type: application/json
{
    "cname": "weile"
}

where as this is OK:

POST http://localhost:55200/test HTTP/1.1
content-type: application/json

{
    "cname": "weile"
}
50reactions
dcsancommented, Oct 6, 2019

so the extra line is critical. a bit of a pedantic bug…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Header name must be a valid HTTP token ["Authorization "] in ...
There should be an empty line break between the header (content-type: application/json) and the request payload/data.
Read more >
Header name must be a valid HTTP token - Postman community
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...
Read more >
Rest-Client header name must be a valid-http-token - YouTube
CoderCrab #RestClient Issue Explanation at 3:29This video will help people to use Rest-Client for their day to day development activity...
Read more >
Error: Header name must be a valid HTTP token : r/flask - Reddit
I am new to Flask but when I am using PostMan to call a Python service running on Win10, this is the error...
Read more >
postman header name must be a valid http token
postman header name must be a valid http token ... You have to fetch the CSRF Token by making a GET Request: Header:...
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