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

993 Commits

Author SHA1 Message Date
Jay d99d5faac2 Fix/karma sauce errors (#3717)
* [Updated] karma sauce launcher which should fix suace tests that are no longer showing as passed and rather completed

* [Updated] karma config to follow es-lint rules of axios

* [Updated] karma version to latest

* [Added] propper browsers when testing local
2021-04-01 07:41:15 +02:00
Jay c461ae9e97 [Updated] karma sauce launcher which should fix suace tests that are no longer showing as passed and rather completed (#3712) 2021-03-30 08:23:47 +02:00
Mike Bishop b0959f0301 Adding ability to omit User-Agent header (#3703)
* Adding ability to omit User-Agent header

* Update line to be more compact

* Add unit tests for user-agent cases

Co-authored-by: Jay <jasonsaayman@gmail.com>
2021-03-29 16:47:29 +02:00
Jay c0317b7453 Update README.md (#3707) 2021-03-29 16:43:29 +02:00
Daniel Lopretto f2057f77b2 Testing and cleanup of transformResponse (#3377)
- Tests for transformResponse
 - Remove eslint error by renaming the var
 - Test that there data a length to avoid JSON.parse headache
 - Use `util.isString()` over `typeof`

Co-authored-by: Jay <jasonsaayman@gmail.com>
2021-03-24 08:22:03 +02:00
Jay 364867edd2 [Updated] follow-redirects version (#3694)
I have updated the version of follow redirects to see if this will fix a potential memory leak that has been noted by a couple users. This is also being updated to see if it will pass building.
2021-03-23 16:47:51 +02:00
Jake 5c122b7eaf Change homepage link to https://axios-http.com (#3681) 2021-03-15 17:17:33 +02:00
Sasha Korotkov 62d6256039 issue#2609 | Sasha | predictable axios requests (#2702)
* issue#2609 | Sasha | predictable axios requests

- axios requests are not delayed by pre-emptive promise creation by default
- add options to interceptors api ("synchronous" and "runWhen")
- add documentation and unit tests

* issue#2609 | Sasha | pull request feedback changes

* issue#2609 | Sasha | additional feedback changes

* issue#2609 | Sasha | put back try/catch

* issue#2609 | Sasha | add 2 adapter unit tests

- remove check for requestCancelled

Co-authored-by: ak71845 <alexandre.korotkov@kroger.com>
Co-authored-by: Xianming Zhong <chinesedfan@qq.com>
Co-authored-by: Jay <jasonsaayman@gmail.com>
2021-03-01 11:11:35 +02:00
Nisar Hassan Naqvi 535d0c45c1 move the mention of gitpod to the main readme + modify gitpod description. (#2637)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2021-02-17 08:28:00 +02:00
Ryota Ikezawa a6e3707fd4 Fixing a typographical error (#3567) 2021-02-15 21:47:28 +08:00
caikan 79979d9214 Removing duplicate functionality item in changelog (#3523)
Co-authored-by: Xianming Zhong <chinesedfan@qq.com>
2021-02-06 23:09:47 +08:00
Elina Gorshkova a250b00cd8 Fix grammar (#2642)
Fixed typos and grammatical errors.

Co-authored-by: Jay <jasonsaayman@gmail.com>
2021-02-05 07:52:45 +02:00
Xianming Zhong 7d3b626a59 Merge branch 0.21.1 into master (#3610)
* Updating changelog for 0.21.1 release

* Releasing 0.21.1

Co-authored-by: Emily Morehouse <emily@cuttlesoft.com>
2021-01-31 20:17:04 +02:00
Xianming Zhong 9a4d7ac236 Fix the missing launcher (#3538)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2021-01-29 08:34:49 +02:00
Ali Clark fe52a611ef Default headers example AUTH_TOKEN comment (#3539)
* 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
2021-01-12 16:52:42 +02:00
Daniel Lopretto 59ab559386 Update dev dependencies (#3401)
- Everything still works as expected.
  - Remove bundlesize
    - It still uses libtorb which is deprecated and broken on Win and
      requires a full suite of build tools on Mac. Keeping it in the
      package makes it difficult for anyone filing issues to run tests.
    - See: #3396
  - Update grunt and it's plugins
  - Update karma to v4...so much faster!
    - Changed the karma config. Better changes: #3394
  - Update Webpack
    - Uses terser over uglify
  - Update eslint
    - Caused an error in util.js from the `global` directive so the
      directive is removed (it was not needed).
  - Update typescript
    - The old version of tsc didn't know about new features in
      @types/node (like `asserts value`).

Co-authored-by: Jay <jasonsaayman@gmail.com>
2020-12-16 10:25:06 +02:00
Daniel Lopretto 8b0f373df0 Use different socket for Win32 test (#3375)
* Remove the skipping of the `socket` http test

* Use different socket path for Win32

 - See: https://github.com/nodejs/node-v0.x-archive/blob/master/test/simple/test-pipe-stream.js#L73
 - Also: https://github.com/nodejs/node-v0.x-archive/blob/master/test/common.js#L39

* Updating axios in types to be lower case (#2797)

Co-authored-by: Xianming Zhong <chinesedfan@qq.com>

Co-authored-by: Pilot <timemachine@ctrl-c.club>
Co-authored-by: Remco Haszing <remcohaszing@gmail.com>
Co-authored-by: Xianming Zhong <chinesedfan@qq.com>
Co-authored-by: Jay <jasonsaayman@gmail.com>
2020-12-09 13:04:58 +02:00
Jonathan Foster e426910be7 Protocol not parsed when setting proxy config from env vars (#3070)
* 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
2020-12-03 09:36:50 +02:00
Daniel Lopretto c7329fefc8 Hotfix: Prevent SSRF (#3410)
* Reproducing the Vulnerability

* Prevent SSRF

* Cleanup

* Refactor to skip duplicate code

* Tests for correct passed data.

* Code review changes.
2020-11-24 08:44:00 +02:00
Jason Kwok f472e5da5f Adding a type guard for AxiosError (#2949)
Co-authored-by: Jason Kwok <JasonHK@users.noreply.github.com>
2020-11-03 10:01:07 +02:00
Daniel Lopretto 768825589f Remove the skipping of the socket http test (#3364)
Co-authored-by: Pilot <timemachine@ctrl-c.club>
2020-10-30 08:54:42 +02:00
Remco Haszing 820fe6e41a Updating axios in types to be lower case (#2797)
Co-authored-by: Xianming Zhong <chinesedfan@qq.com>
2020-10-27 20:36:32 +08:00
Emily Morehouse 94ca24b5b2 Releasing 0.21.0 2020-10-23 10:26:35 -06:00
Emily Morehouse 2130a0c8ac Updating changelog for 0.21.0 release 2020-10-23 10:22:07 -06:00
Jay fbdc1502b1 Lock travis to not use node v15 (#3361)
I have made this change due to current builds failing. We should not be testing in node v15 as you can see on this graph https://nodejs.org/en/about/releases/ 10 till 14 should be fine till 2023 and v15 is not LTS so should be excluded for now.
2020-10-23 14:17:02 +02:00
Taemin Shin 3a8b87d48a Fixing an issue that type 'null' and 'undefined' is not assignable to validateStatus when typescript strict option is enabled (#3200) 2020-10-20 08:04:44 +02:00
George Cheng 9a78465a92 Revert "Fixing overwrite Blob/File type as Content-Type in browser. (#1773)" (#3289)
This reverts commit f3cc053fb9.
2020-10-13 10:19:37 +02:00
Kevin Kirsche 6d05b96dca Fix typos (#3309)
Fix typos
2020-10-03 12:25:07 -06:00
Xianming Zhong fa3673710e fix axios.delete ignores config.data (#3282)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2020-10-01 09:46:32 +02:00
Remco Haszing b7e954eba3 Fixing node types (#3237)
The `ProgressEvent` type comes from the `DOM` lib. This is typically unwanted
when using axios in a NodeJS environment.

Co-authored-by: Jay <jasonsaayman@gmail.com>
2020-10-01 09:42:09 +02:00
Allan Cruz 04d45f2091 Fixing requestHeaders.Authorization (#3287) 2020-09-20 10:19:48 +08:00
Tim Gates e8c6e19141 docs: Fix simple typo, existant -> existent (#3252) 2020-09-12 12:29:35 +08:00
Emily Morehouse 0d87655624 Releasing 0.20.0 2020-08-20 21:11:58 -06:00
Emily Morehouse cd27741ff6 Updating changelog for 0.20.0 release 2020-08-20 21:05:46 -06:00
Emily Morehouse ffea03453f Releasing 0.20.0-0 2020-07-15 10:04:59 -06:00
Emily Morehouse fe147fbd3b Updating changlog for 0.20.0 beta release 2020-07-15 09:58:58 -06:00
Cr 16aa2ce7fa Fixing response with utf-8 BOM can not parse to json (#2419)
* fix: remove byte order marker (UTF-8 BOM) when transform response

* fix: remove BOM only utf-8

* test: utf-8 BOM

* fix: incorrect param name

Co-authored-by: Jay <jasonsaayman@gmail.com>
2020-07-01 19:14:52 +02:00
Kamil Posiadała c4300a88cf Adding support for URLSearchParams in node (#1900)
* 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>
2020-06-25 19:06:00 +02:00
Frostack bed6783452 add table of content (preview) (#3050)
* add toc (preview)

* remove toc in toc

Signed-off-by: Moni <usmoni@gmail.com>

* fix sublinks

* fix indentation

* remove redundant table links

* update caps and indent

* remove axios

Co-authored-by: Moni <usmoni@gmail.com>
Co-authored-by: Jay <jasonsaayman@gmail.com>
2020-06-25 18:41:10 +02:00
Xianming Zhong c70fab9d56 Fix stale bot config (#3049)
* fix stale bot config

* fix multiple lines
2020-06-23 07:58:00 +02:00
Jay 5b08fc4ac7 Add days and change name to work (#3035) 2020-06-18 08:58:03 +02:00
Jay 1768c23da0 Update close-issues.yml (#3031)
* Update close-issues.yml

Update close message to read better 😄

* Fix use of quotations

Use single quotes as per other .yml files

* Remove user name form message
2020-06-17 19:32:08 +02:00
Xianming Zhong 3dbf6a1b6a Add GitHub actions to close stale issues/prs (#3029)
* prepare stale actions

* update messages

* Add exempt labels and lighten up comments

Co-authored-by: Jay <jasonsaayman@gmail.com>
2020-06-17 19:25:11 +02:00
Xianming Zhong a9010e4525 Add GitHub actions to close invalid issues (#3022)
* add close actions

* fix with checkout

* update issue templates

* add reminder

* update close message
2020-06-17 18:54:09 +02:00
rockcs1992 36f0ad2f98 Replace 'blacklist' with 'blocklist' (#3006) 2020-06-10 13:47:31 -06:00
Xianming Zhong 0d69a79c81 Refactor mergeConfig without utils.deepMerge (#2844)
* Adding failing test

* Fixing #2587 default custom config persisting

* Adding Concat keys and filter duplicates

* Fixed value from CPE

* update for review feedbacks

* no deepMerge

* only merge between plain objects

* fix rename

* always merge config by mergeConfig

* extract function mergeDeepProperties

* refactor mergeConfig with all keys, and add special logic for validateStatus

* add test for resetting headers

* add lots of tests and fix a bug

* should not inherit `data`

* use simple toString

* revert #1845

Co-authored-by: David Tanner <david.tanner@lifeomic.com>
Co-authored-by: Justin Beckwith <justin.beckwith@gmail.com>
2020-06-08 20:52:45 +02:00
Martti Laine 487941663b Allow unsetting headers by passing null (#382) (#1845)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2020-06-04 20:57:54 +02:00
Xianming Zhong 4b3947aa59 Add test with Node.js 12 (#2860)
* test with Node.js 12

* test with latest

Co-authored-by: Jay <jasonsaayman@gmail.com>
2020-06-02 08:13:57 +02:00
Philippe Recto 0077205c0b Adding console log on sandbox server startup (#2210)
* Adding console log on sandbox server startup

* Update server.js

Add server error handeling

* Update server.js

Better error message, remove retry.

Co-authored-by: Philippe Recto <precto1285@gmal.com>
Co-authored-by: Felipe Martins <felipewmartins@gmail.com>
Co-authored-by: Jay <jasonsaayman@gmail.com>
2020-05-29 19:49:55 +02:00
jeffjing ee46dff3ef docs(): Detailed config options environment. (#2088)
* docs(): Detailed config options environment.

* Update README.md

Co-authored-by: Jay <jasonsaayman@gmail.com>
2020-05-29 19:08:27 +02:00