2
0
mirror of https://github.com/tenrok/axios.git synced 2026-05-15 11:59:42 +03:00

Update README.md (#3936)

Fixing the example JSON of `Request Config`

Co-authored-by: Jay <jasonsaayman@gmail.com>
This commit is contained in:
Mo Sattler
2021-08-13 08:45:46 -04:00
committed by GitHub
parent b42fbad57b
commit e091491127
+4 -4
View File
@@ -456,20 +456,20 @@ These are the available config options for making requests. Only the `url` is re
// automatically. If set to `true` will also remove the 'content-encoding' header
// from the responses objects of all decompressed responses
// - Node only (XHR cannot turn off decompression)
decompress: true // default
decompress: true, // default
// transitional options for backward compatibility that may be removed in the newer versions
transitional: {
// silent JSON parsing mode
// `true` - ignore JSON parsing errors and set response.data to null if parsing failed (old behaviour)
// `false` - throw SyntaxError if JSON parsing failed (Note: responseType must be set to 'json')
silentJSONParsing: true; // default value for the current Axios version
silentJSONParsing: true, // default value for the current Axios version
// try to parse the response string as JSON even if `resposeType` is not 'json'
forcedJSONParsing: true;
forcedJSONParsing: true,
// throw ETIMEDOUT error instead of generic ECONNABORTED on request timeouts
clarifyTimeoutError: false;
clarifyTimeoutError: false,
}
}
```