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

Adding documentation for Buffer data

This commit is contained in:
Rubén Norte
2017-04-08 14:04:10 +02:00
parent 188334439f
commit 19644bac7b
+3 -2
View File
@@ -213,7 +213,8 @@ 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 // `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' // This is only applicable for request methods 'PUT', 'POST', and 'PATCH'
// The last function in the array must return a string, an ArrayBuffer, FormData, or a Stream // The last function in the array must return a string or an instance of Buffer, ArrayBuffer,
// FormData or Stream
transformRequest: [function (data) { transformRequest: [function (data) {
// Do whatever you want to transform the data // Do whatever you want to transform the data
@@ -248,7 +249,7 @@ These are the available config options for making requests. Only the `url` is re
// When no `transformRequest` is set, must be of one of the following types: // When no `transformRequest` is set, must be of one of the following types:
// - string, plain object, ArrayBuffer, ArrayBufferView, URLSearchParams // - string, plain object, ArrayBuffer, ArrayBufferView, URLSearchParams
// - Browser only: FormData, File, Blob // - Browser only: FormData, File, Blob
// - Node only: Stream // - Node only: Stream, Buffer
data: { data: {
firstName: 'Fred' firstName: 'Fred'
}, },