We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a0fe9a3 commit 81eaf56Copy full SHA for 81eaf56
README.md
@@ -254,6 +254,20 @@ const opts = {
254
get(opts, function (err, res) {})
255
```
256
257
+### Basic Auth
258
+
259
+```js
260
+const user = 'someuser'
261
+const pass = 'pa$$word'
262
+const encodedAuth = Buffer.from(`${user}:${pass}`).toString('base64')
263
264
+get('http://example.com', {
265
+ headers: {
266
+ authorization: `Basic ${encodedAuth}`
267
+ }
268
+})
269
+```
270
271
### OAuth
272
273
You can use the [`oauth-1.0a`](https://github.com/ddo/oauth-1.0a) module to create
0 commit comments