* Updating the 'Global axios defaults' README to use a safer example
The existing example usage it isn't safe in the general case as it can
lead to auth tokens being leaked to 3rd party endpoints by unexpectedly.
This change instead gives an example using
"axios.defaults.headers.common" to set the User-Agent, which is an
equally helpful use-case to document.
The 'Custom instance defaults' example just below the 'Global axios
defaults' example shows a method to set the 'Authorization' header
specific to a given API. I've also updated the variable in the 'Custom
instance defaults' code to use a semantically more relevant name within
that example.
* Revert the example instance name in response to PR request
* Reintroduce the Authorization example with a disclaimer about its usage
* Update wording nb -> important on usage comment
* Remove User-Agent example due to issues with this on Chrome and Safari
See https://github.com/axios/axios/issues/1231
Credit @chinesedfan for pointing this out
* Fixing proxy protocol config when parsed from env vars
* Adding instructions to specify proxy protocol when setting proxy config
* Moved HTTPS proxy config instruction closer to example
* Clear https_proxy env var so as to not impact other tests
* Adding support for URLSearchParams in node
* Remove un-needed code
* Update utils.js
* Make changes as suggested
Co-authored-by: Kamil Posiadala <kamil.posiadala@codecentric.de>
Co-authored-by: Jay <jasonsaayman@gmail.com>
Small change to the data attribute doc of the config. A request body can also be set for DELETE methods but this wasn't mentioned in the documentation (it only mentioned POST, PUT and PATCH). Took my some 10-20 minutes until I realized that I don't need to manipulate the request body with transformRequest in the case of DELETE.
Co-authored-by: Jay <jasonsaayman@gmail.com>
* Made a adjustment to the documenation to clear up any ambiguity around the use of "fs". This should help clear up that the code examples with "fs" cannot be used on the client side.
Co-authored-by: Jay <jason.saayman@basebone.com>
* Adding ability to disable auto decompression
* Updating decompress documentation in README
* Fixing test\unit\adapters\http.js lint errors
* Adding test for disabling auto decompression
* Removing changes that fixed lint errors in tests
* Removing formating change to unit test
Co-authored-by: Xianming Zhong <chinesedfan@qq.com>
Saw in #928 and #1966 that `onUploadProgress` and `onDownloadProgress` only work in the browser and was missing that from the README.
Co-authored-by: Xianming Zhong <chinesedfan@qq.com>
* README.md COOKBOOK.md: minor fixes
* simplify language
* ECOSYSTEM: create a few categories
* Examples: log port listening to
* upgrade bootstrap 3 -> 4 in examples
bootstrap 4 is slightly smaller then 3.2.0
so it should also help load examples faster
* categorize 0.19 items a little differently
surface user/consumer changes first
It seems that `responseType: 'blob'` doesn't actually work in Node (when I tried using it, response.data was a string, not a Blob, since Node doesn't have Blobs), so this clarifies that this option should only be used in the browser
* Adding support for no_proxy env variable
* Adds support for the no_proxy environment variable commonly available
with programs supporting the http_proxy/https_proxy environment
variables.
* Adds tests to test the no_proxy environment variable.
* Adding documentation for the proxy env variables
* Adds documentation to README.md for the supported, conventional
http_proxy, https_proxy, and no_proxy environment variables.