Error Invalid Character In Header Content

[Solved] Error Invalid Character In Header Content | Shell - Code Explorer | yomemimo.com
Question : error: invalid character in header content ["host"]

Answered by : kyle-h9fpwzeg0a3y

had the same error being reported for any forked or created Postman requests:
Error: Invalid character in header content ["Host"]
The request URL was using a global parameter:
{{BaseUri}}/some/sort/of/resource
In the console logs the following was reported (URLs redacted):
Request Headers
User-Agent: PostmanRuntime/7.29.0
Accept: */*
Cache-Control: no-cache
Postman-Token: 9d14e81d-1e21-44a2-93ed-2758f0ad24fa
Host: my.url.co.uk↵
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Note the ↵ character at the end of the Host Header.
The global BaseUri parameter did not appear to have a line break at the end of it. However, completely deleting said parameter and recreating it seems to have fixed the issue.

Source : | Last Update : Thu, 06 Oct 22

Answers related to error invalid character in header content

Code Explorer Popular Question For Shell