From e270c70d4dba6b24263aa298debaa6ca5f92c299 Mon Sep 17 00:00:00 2001 From: Idan Gazit Date: Wed, 9 Dec 2015 11:55:15 +0200 Subject: [PATCH] Documenting the HTTP Basic auth request config --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 3cba598..16285b0 100644 --- a/README.md +++ b/README.md @@ -215,6 +215,14 @@ These are the available config options for making requests. Only the `url` is re // should be made using credentials withCredentials: false, // default + // `auth` indicates that HTTP Basic auth should be used, and supplies credentials. + // The username can be supplied as `user` or `username` + // The password can be supplied as `pass` or `password` + auth: { + user: 'janedoe', + pass: 's00pers3cret' + } + // `responseType` indicates the type of data that the server will respond with // options are 'arraybuffer', 'blob', 'document', 'json', 'text' responseType: 'json', // default