2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-17 19:21:29 +03:00

Update README.md

This commit is contained in:
Nick Uraltsev
2016-04-14 21:04:22 -07:00
parent d23f9d5d47
commit d88bc12e59
+3 -3
View File
@@ -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 // `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 or an ArrayBuffer // The last function in the array must return a string, an ArrayBuffer, or a Stream
transformRequest: [function (data) { transformRequest: [function (data) {
// Do whatever you want to transform the 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 // `data` is the data to be sent as the request body
// Only applicable for request methods 'PUT', 'POST', and 'PATCH' // 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: { data: {
firstName: 'Fred' 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 // `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 responseType: 'json', // default
// `xsrfCookieName` is the name of the cookie to use as a value for xsrf token // `xsrfCookieName` is the name of the cookie to use as a value for xsrf token