2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-20 20:00:40 +03:00

Adding support for URLSearchParams

This commit is contained in:
Nick Uraltsev
2016-05-07 12:26:28 -07:00
parent ea375220a2
commit f20490eb6b
10 changed files with 108 additions and 20 deletions
+5 -1
View File
@@ -216,6 +216,7 @@ These are the available config options for making requests. Only the `url` is re
headers: {'X-Requested-With': 'XMLHttpRequest'},
// `params` are the URL parameters to be sent with the request
// Must be a plain object or a URLSearchParams object
params: {
ID: 12345
},
@@ -228,7 +229,10 @@ These are the available config options for making requests. Only the `url` is re
// `data` is the data to be sent as the request body
// Only applicable for request methods 'PUT', 'POST', and 'PATCH'
// When no `transformRequest` is set, must be a string, an ArrayBuffer, a hash, or a Stream
// When no `transformRequest` is set, must be of one of the following types:
// - string, plain object, ArrayBuffer, ArrayBufferView, URLSearchParams
// - Browser only: FormData, File, Blob
// - Node only: Stream
data: {
firstName: 'Fred'
},