tomas / needle

Nimble, streamable HTTP client for Node.js. With proxy, iconv, cookie, deflate & multipart support.

Home Page:https://www.npmjs.com/package/needle

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Basic Auth { username, password, auth: "basic" } is not working

nhusby opened this issue · comments

I switched to needle, and basic auth is not working. It is not setting the authorization header properly.

I tried setting these options and it doesn't work. When I manually enter the header, that works.
{ username: ZD_CONFIG.email + '/token', password: ZD_CONFIG.api_token, auth: 'basic', }

What response are you receiving from the endpoint? Can you try with DEBUG=needle to see what's going on behind the curtains?