2
0
mirror of https://github.com/tenrok/axios.git synced 2026-05-24 14:04:14 +03:00
Commit Graph

48 Commits

Author SHA1 Message Date
Spencer von der Ohe 42eb9dfabc Adding option to disable automatic decompression (#2661)
* 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>
2020-03-06 22:01:58 +08:00
Gustavo López 6642ca9aa1 Add independent maxBodyLength option (#2781)
* Add independent option to set the maximum size of the request body

* Remove maxBodyLength check

* Update README

* Assert for error code and message
2020-03-06 21:55:19 +08:00
Xianming Zhong 5214445139 Add test for redirecting with too large response (#2695) 2020-02-29 19:54:41 +08:00
jennynju 9267d4def1 Fixing unit test failure in Windows OS (#2601)
Co-authored-by: Xianming Zhong <chinesedfan@qq.com>
2020-02-15 19:03:34 +08:00
multicolaure 6fe506fda2 Do not modify config.url when using a relative baseURL (resolves #1628) (#2391)
* Adding tests to show config.url mutation

Because config.url is modified while processing the request
when the baseURL is set,
it is impossible to perform a retry with the provided config object.

Ref #1628

* Fixing url combining without modifying config.url

As config.url is not modified anymore during the request processing.
The request can safely be retried after it failed with the provided
config.

resolves #1628
2019-09-05 12:43:55 -03:00
Rikki Gibson 21ae22dbd3 Preserve HTTP method when following redirect (#1758)
Resolves #1158

This modifies http.js to uppercase the HTTP method, similar to xhr.js, before passing the request off to the transport. This causes follow-redirects to preserve the HTTP method when automatically making a request to the next URL.
2018-08-27 17:26:38 +02:00
Chance Dickson 38de25257c Adding support for no_proxy env variable (#1693)
* 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.
2018-08-07 11:52:04 -06:00
Justin Beckwith 98080381fa test: use mocha instead of nodeunit (#1655) 2018-07-05 22:41:13 -07:00
Mark van den Broek 787c808c04 Fix: Removes usage of deprecated Buffer constructor. (#1555) (#1622) 2018-07-04 23:47:17 -07:00
Martti Laine 961ecd129c Correctly catch exception in http test (#1475) 2018-04-11 09:23:01 -06:00
Justin Beckwith c65065ac0f capture errors on request data streams 2018-03-15 22:12:42 -07:00
Emily Morehouse 4ea77b70b7 Follow up to #1070:
- Adding information in README for socketPath when used with a proxy
- Adding an HTTP test for socketPath option
2018-02-16 17:18:58 -07:00
Julien Roncaglia 07a7b7c84c Adding a way to disable all proxy processing (#691)
* Adding a way to disable all proxy processing

When the proxy field in configuration is === false all proxy processing is
disabled. This specifically disable the 'http_proxy' environment variable
handling.

Fixes #635
Related to #434

* Change readme wording

From review comment on PR (#691)
2017-08-14 13:38:44 +02:00
Nick Uraltsev fa582233af Merge pull request #828 from mzabriskie/feature/return-last-request-in-redirects
Return the last request made in axios response
2017-04-08 11:26:05 -07:00
Jeremy Fowler 188334439f support node buffers less than 8192 bytes (#773) 2017-04-08 13:55:34 +02:00
Rubén Norte e5beab045c Adding test checking the request in axios response is the last in a redirect 2017-04-08 12:45:54 +02:00
Marc Mignonsin df6d3ce6cf Support proxy auth (#483)
* Adding proxy auth
2016-10-19 11:02:42 +02:00
Nick Uraltsev 72dd897bb5 Adding cancellation support 2016-09-17 11:52:56 -07:00
Nick Uraltsev 65ffdaefe8 Fixing build failure 2016-08-24 15:42:03 -07:00
Hubert Boma Manilla 93ae90ae6e Adding support for http_proxy and https_proxy environment variables 2016-08-24 09:05:26 -07:00
Christian Schuhmann 1ffcbb0369 Fixing Authorization header with basic auth
The http adapater did not remove a custom Authorization header when auth is set.
2016-08-04 08:34:07 +02:00
Nick Uraltsev 91dae3c4ad Improve error handling 2016-06-13 13:56:08 -07:00
Nick Uraltsev 5c5a94007c Adding test for maxRedirects option 2016-05-31 18:29:32 -07:00
Nick Uraltsev 4e7ca3dea3 Resolving conflicts and modifying http adapter to not change status code error range 2016-05-31 17:53:45 -07:00
Nick Uraltsev 600653e293 Adding test for compression error handling 2016-05-18 19:47:12 -07:00
dublx a04077a17d Choose between follow-redirects or core 2016-04-22 15:47:16 +01:00
Nick Uraltsev d23f9d5d47 Add support for Stream 2016-04-14 17:38:35 -07:00
bomsy fefa23a8dd Adding config option to restrict based on the size of the response co… 2016-03-25 23:50:52 +00:00
Matt Zabriskie e2fbc68960 Removing console.log 2016-03-03 22:43:38 -07:00
Andrew Crites 116f5fca88 Fixing 245:
Formatting and adding tests
2016-02-28 22:51:20 -05:00
Matt Zabriskie 7a16f72895 Improving logic for handling timeout in node
closes #124
2016-01-22 16:27:54 -07:00
Gary Chambers f44d9ce677 Fixing redirect behaviour 2016-01-19 14:51:14 +00:00
Konstantin Baumann 32dfc1d9e0 add test case for transparent decompression for content-encoding being set in the response headers 2015-11-12 11:34:07 +01:00
mzabriskie fc12b933f7 Moving many nodeunit tests to jasmine 2015-03-18 17:12:51 -06:00
mzabriskie dfa816df9b Adding utils tests 2015-03-17 23:07:32 -06:00
mzabriskie 6d03e0bd4e Fixing issues with strict mode
closes #45
2015-03-10 14:28:43 -06:00
mzabriskie e880940099 Stray console.log 2015-02-02 23:11:09 -07:00
mzabriskie 0412c7666e Fixing issue with multibyte characters in node
closes #38
2015-02-02 22:04:18 -07:00
mzabriskie 1b803fb233 Moving stuff to helpers/ 2014-09-22 11:12:24 -06:00
mzabriskie f406b092fc Fixing failing tests 2014-09-22 10:47:41 -06:00
mzabriskie e1aa04ccee Fixing issue #3 2014-09-16 18:23:31 -06:00
Matt Zabriskie c43f2b9710 Adding support for all and spread 2014-09-05 15:48:58 -06:00
Matt Zabriskie 7aef479c7e Adding xsrf protection 2014-08-29 01:17:40 -06:00
Matt Zabriskie cec3482ff7 Moving utility functions into utils 2014-08-28 12:33:53 -06:00
Matt Zabriskie d49cb34591 Updating forEach to handle non iterable values 2014-08-27 14:05:27 -06:00
Matt Zabriskie c0a9184739 Using response headers 2014-08-27 03:12:29 -06:00
Matt Zabriskie 514e281a1b Adding support for params 2014-08-27 02:08:39 -06:00
Matt Zabriskie 9096d34186 Breaking up complexity of main axios file 2014-08-27 01:06:19 -06:00