mirror of
https://github.com/tenrok/axios.git
synced 2026-06-17 19:21:29 +03:00
Merge pull request #296 from nickuraltsev/stream
Adding support for Stream with HTTP adapter
This commit is contained in:
@@ -191,7 +191,7 @@ These are the available config options for making requests. Only the `url` is re
|
||||
|
||||
// `transformRequest` allows changes to the request data before it is sent to the server
|
||||
// This is only applicable for request methods 'PUT', 'POST', and 'PATCH'
|
||||
// The last function in the array must return a string or an ArrayBuffer
|
||||
// The last function in the array must return a string, an ArrayBuffer, or a Stream
|
||||
transformRequest: [function (data) {
|
||||
// Do whatever you want to transform the data
|
||||
|
||||
@@ -222,7 +222,7 @@ 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 or a hash
|
||||
// When no `transformRequest` is set, must be a string, an ArrayBuffer, a hash, or a Stream
|
||||
data: {
|
||||
firstName: 'Fred'
|
||||
},
|
||||
@@ -250,7 +250,7 @@ These are the available config options for making requests. Only the `url` is re
|
||||
}
|
||||
|
||||
// `responseType` indicates the type of data that the server will respond with
|
||||
// options are 'arraybuffer', 'blob', 'document', 'json', 'text'
|
||||
// options are 'arraybuffer', 'blob', 'document', 'json', 'text', 'stream'
|
||||
responseType: 'json', // default
|
||||
|
||||
// `xsrfCookieName` is the name of the cookie to use as a value for xsrf token
|
||||
|
||||
Reference in New Issue
Block a user