Open Nordes opened 6 years ago
I was actually able to set it like the following:
I previously tried using the creation options contentType
but it didn't change anything. Was it a wanted behavior?
Hi @Nordes , you can set headers using the options 'headers':
client.post({
headers: {
'content-type': 'foobarbaz'
},
path: '/'
}, function() { ... });
That said, for content-type specifically, we seem to be deleting content-type headers for GET/HEAD/DELETE verbs. While generally this seems reasonable, in reading the RFC it doesn't actually suggest that content-type is required (or disallowed) based on the verbs. This seems like a legitimate bug.
Hi, maybe I am doing it wrong, but I am not able to set the CharSet in the headers.
(Needed to send some japanese body) Usually in postman: Content-Type: application/json; charset=UTF-8
I`ve tried to set the headers :
But it fails. It still send the wrong text.