2
0
mirror of https://github.com/tenrok/axios.git synced 2026-05-24 14:04:14 +03:00

Documenting the HTTP Basic auth request config

This commit is contained in:
Idan Gazit
2015-12-09 11:55:15 +02:00
parent 19cbca0c71
commit e270c70d4d
+8
View File
@@ -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