phin icon indicating copy to clipboard operation
phin copied to clipboard

How to use basic auth that is part of URL

Open ASaiAnudeep opened this issue 3 years ago • 3 comments

How can we pass basic auth credentials as part of the request url?

Example:

https://admin:[email protected]/basic_auth

const p = require('phin');

await p({
  url: 'https://admin:[email protected]/basic_auth',
  method: 'GET'
})

ASaiAnudeep avatar Sep 12 '21 07:09 ASaiAnudeep

I'll do some research, create a test case, and get back to you on this.

ethan7g avatar Sep 12 '21 07:09 ethan7g

We need to handle it in centra in this way - https://stackoverflow.com/a/11853077/5401310

ASaiAnudeep avatar Jun 14 '22 18:06 ASaiAnudeep

@ASaiAnudeep you can look at my issue, I added the workaround, and it works for me.

AlexeyCL avatar Jun 15 '22 08:06 AlexeyCL