Closed tomer-ben-david closed 7 years ago
Looks right but I haven't tried this particular scenario myself. Have you tried comparing the working and non-working request/responses using a tool like Fiddler?
it's a good idea, thanks.. i will do it next time :) I have resolved it by replacing it with following snippet instead:
method: 'post',
headers: [
{
name: 'content-type',
value: 'application/zip'
}
],
auth: {
bearer: `${apiKey}`
}
Ah, yes, Was just looking at the docs for request (upon which this is based) and your latest looks closer to what they have in their example code. Glad you got it working.
I want to pass 2 headers so I tried:
i'm not sure i'm using the correct format for request headers since i get:
401 Unauthorized
and if i use the same headers withcurl
all is ok.. anything i'm doing wrong?