sync-request icon indicating copy to clipboard operation
sync-request copied to clipboard

HTTP Basic Access Authentication Support

Open reyy opened this issue 9 years ago • 2 comments

It appears that sync-request does not support basic access authentication. Are there any plans to include this in the future?

reyy avatar Jul 01 '15 09:07 reyy

Haven't thought about this yet, it's actually just a simple case of setting the correct header though. i.e.

var optioins = {
  headers: {
    authorization: 'Basic ' + new Buffer(username + ':' + password, 'ascii').toString('base64')
  }
};

ForbesLindesay avatar Jul 15 '15 15:07 ForbesLindesay

If we were going to add it, we would do so by adding it to https://github.com/then/then-request.

ForbesLindesay avatar Jul 15 '15 15:07 ForbesLindesay