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

914 Commits

Author SHA1 Message Date
Ian Wijma b139abfc36 Add onUploadProgress and onDownloadProgress are browser only (#2763)
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>
2020-02-26 10:28:49 +08:00
Jimmy Liao 3d6cafb3f7 Update ' sign to ` in proxy spec (#2778) 2020-02-25 23:05:51 +08:00
Thibault Ehrhart 17a967123c Adding responseEncoding to mergeConfig (#1745)
Co-authored-by: Xianming Zhong <chinesedfan@qq.com>
2020-02-15 21:49:26 +08:00
Lukas Drgon 2cf6ae4608 Adding jsDelivr link in README (#1110)
* Adding jsDelivr link

* Add SRI

* Remove SRI

Co-authored-by: Yasu Flores <carlosyasu91@gmail.com>
Co-authored-by: Xianming Zhong <chinesedfan@qq.com>
2020-02-15 20:48:16 +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
Nikita Galkin 12e00b8018 Fixing issue for HEAD method and gziped repsonse (#2666) 2020-02-15 18:10:58 +08:00
Xianming Zhong 2034c1db7e Fix tests in browsers (#2748) 2020-02-15 15:54:43 +08:00
Xianming Zhong 56b72bbd2c Compatible with follow-redirect aborts the request (#2689)
* Compatible with follow-redirect aborts the request

* Use the error code
2020-02-15 13:41:08 +08:00
Jonathan Sharpe 77f0ae4f61 Fix merging of params (#2656)
* Name function to avoid ESLint func-names warning

* Switch params config to merge list and update tests

* Restore testing of both false and null

* Restore test cases for keys without defaults

* Include test for non-object values that aren't false-y.
2020-02-15 13:36:52 +08:00
JounQin 371d8eac79 chore: add jsdelivr and unpkg support (#2443) 2020-01-31 10:20:12 -08:00
Xianming Zhong 7df84a7ff7 Revert finally as then (#2683)
Co-authored-by: Yasu Flores <carlosyasu91@gmail.com>
2020-01-22 12:18:22 -08:00
Emily Morehouse 2a0ff479f9 Releasing 0.19.2 2020-01-21 21:24:50 -07:00
Emily Morehouse 17cc1d6d7a Updating changlog for 0.19.2 release 2020-01-20 09:24:56 -07:00
Xianming Zhong c7488c7dd5 Remove unnecessary XSS check introduced by #2451 (#2679)
* Remove unnecessary XSS check introduced by #2451

* Remove test file of `isValidXss`
2020-01-20 09:20:33 -07:00
Emily Morehouse 351cf290f0 Fix link formatting in CHANGELOG.md to display PR number in parens as link (#2643) 2020-01-07 11:54:03 -07:00
Emily Morehouse 960e1c8798 Releasing 0.19.1 2020-01-07 10:21:04 -07:00
Malik Dirim 8a9421de0f Fixing typo in CHANGELOG.md: s/Functionallity/Functionality (#2639) 2020-01-07 09:31:54 -07:00
不才 ee47120a09 If this place is false, it will report an error, so you should delete the useless code. (#2458) 2019-12-25 13:00:15 -08:00
Michael Shin 03e6f4bf4c Fixing invalid agent issue (#1904) 2019-12-25 12:55:36 -08:00
ZhaoXC dc4bc49673 fix: fix ignore set withCredentials false (#2582) 2019-12-08 23:52:45 -08:00
Alanscut 13c948e661 Remove 'includes' API, fix CI build failure (#2574)
* Remove 'includes' API, fix CI build failure
2019-12-09 10:28:37 +08:00
Alanscut fa6cf01c91 fixing Travis link (#2540) 2019-12-09 09:14:52 +08:00
Alanscut a17c70cb5a Fix CI build failure (#2570) 2019-11-26 11:09:42 -08:00
Angelos Chalaris 1a32ca0601 Remove dependency on is-buffer (#1816)
* Remove dependency on is-buffer from package.json
2019-11-17 22:53:27 -08:00
Yasu Flores 0cc22c2f42 Fix badge, use master branch (#2538) 2019-11-15 19:32:37 -08:00
Yasu Flores 841466416b Fix XSS logic that matched some valid urls (#2529)
* Fix XSS logic that matched some valid urls, e.g. "/one/?foo=bar", when it shouldn't match those
2019-11-07 18:39:24 -08:00
Luke Policinski bbfd5b1395 Adding options typings (#2341) 2019-11-03 21:17:27 -08:00
Yasu Flores 55aaebcbf5 Document fix (#2514) 2019-11-03 20:56:17 -08:00
Yasu Flores 86d77504c2 Update docs with no_proxy change, issue #2484 (#2513) 2019-11-03 20:54:19 -08:00
Marlon Barcarol b0afbedf1b Adding Typescript HTTP method definition for LINK and UNLINK. (#2444) 2019-11-03 19:29:51 -08:00
Harshit Singh fa68fd30c3 Update README.md (#2504) 2019-11-03 18:30:49 -08:00
Felipe Martins 097948698a Revert "Update Webpack + deps, remove now unnecessary polyfills" (#2479)
* Revert "Update Webpack + deps, remove now unnecessary polyfills (#2410)"

This reverts commit 189b34c45a.

* Fix build (#2496)

* Change syntax to see if build passes

* Test commit

* Test with node 10

* Test adding all browsers in travis

* remove other browsers when running on travis
2019-10-25 11:34:47 -03:00
Yasu Flores 494d817314 Change syntax to see if build passes (#2488)
* Change syntax to see if build passes

* Test commit

* Test with node 10

* Test adding all browsers in travis

* remove other browsers when running on travis
2019-10-25 11:25:53 -03:00
Avindra Goolcharan 189b34c45a Update Webpack + deps, remove now unnecessary polyfills (#2410)
* Update deps

 * handles webpack 1 -> 4 migration

* remove promise helpers from dev files

assume `Promise` is available, or polyfilled by
the consumer

* Remove isArray util. `isArray` has good coverage, even
   in IE9. So lets remove the custom polyfill.

 https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray

also resolves a few lint issues

* Remove trim util

String.protoype.trim has good coverage (including IE9)

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/Trim

Also, the http adapter already uses the native method.
2019-10-21 15:56:29 -03:00
Yasu Flores 29da6b24db Fix to prevent XSS, throw an error when the URL contains a JS script (#2464)
* Fixes issue where XSS scripts attacks were possible via the URL

* Fix error

* Move throwing error up

* Add specs and make regex cover more xss cases
2019-10-16 07:53:10 -03:00
Crhistian Ramirez ee60ee368e Fixing missing words in docs template (#2259) 2019-10-15 22:32:19 -03:00
IVLIU 6284abfa06 custom timeout prompt copy (#2275)
* style: ui

* feat: custom timeout txtx

* feat: custom timeout txtx
2019-10-15 22:29:16 -03:00
Yasu Flores ccca5e0e21 Add error toJSON example (#2466) 2019-10-15 22:20:56 -03:00
Wataru 19969b4fbd Fixing Vulnerability A Fortify Scan finds a critical Cross-Site Scrip… (#2451)
* Fixing Vulnerability A Fortify Scan finds a critical Cross-Site Scripting

* use var insted of const
2019-10-08 21:23:34 -03:00
Maskedman99 4f189ec80c Add license badge (#2446)
MIT License badge added in README.md file
2019-10-04 15:47:49 +02:00
Felipe Martins 85c9d4ffb0 fix: Fixing subdomain handling on no_proxy (#2442) 2019-09-28 20:51:20 -03:00
Jeremie Thomassey 00cd48027b Make redirection from HTTP to HTTPS work (#2426)
When calling an HTTP resource redirecting to a HTTPS one with a keepAlive agent. We get the following error:
```
TypeError [ERR_INVALID_PROTOCOL]: Protocol "https:" not supported. Expected "http:"
    at new ClientRequest (_http_client.js:119:11)
    at Object.request (https.js:281:10)
    at RedirectableRequest._performRequest (/Users/jthomassey/projects/ecom-shop-web/node_modules/follow-redirects/index.js:169:24)
    at RedirectableRequest._processResponse (/Users/jthomassey/projects/ecom-shop-web/node_modules/follow-redirects/index.js:260:10)
    at ClientRequest.RedirectableRequest._onNativeResponse (/Users/jthomassey/projects/ecom-shop-web/node_modules/follow-redirects/index.js:50:10)
    at Object.onceWrapper (events.js:277:13)
    at ClientRequest.emit (events.js:189:13)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:556:21)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:109:17)
    at Socket.socketOnData (_http_client.js:442:20)
```

This can be tested here : 
```
const http = require('http');
const https = require('https');
const axios = require('axios');

axios.get('http://www.photobox.fr', { httpAgent: http.Agent({ keepAlive:true }), httpsAgent: https.Agent({ keepAlive:true }) })
  .then(response => {
    console.log(response);
    console.log(response.headers);
  })
  .catch(error => {
    console.log(error);
  });
```

Axios delegate the redirection to the follow-redirect package which accept an option `agents` for both http and https agent see : https://github.com/follow-redirects/follow-redirects#per-request-options
2019-09-26 09:33:49 -03:00
Tiago Rodrigues 006b60425c Add toJSON property to AxiosError type (#2427)
I noticed the error object has a `toJSON` method but when I tried to use it in my typescript code it complained it didn't exist, even though I was using the `AxiosError` type.
2019-09-26 09:11:34 -03:00
Jihwan Oh 88dbb82d77 Fix word 'sintaxe' to 'syntax' in README.md (#2432)
- translate 'sintaxe' word from portuguese to english
2019-09-25 21:18:44 -03:00
Ya Hui Liang(Ryou) 93e69625a6 Fixing socket hang up error on node side for slow response. (#1752)
* Fixing socket hang up error on node side for slow response.

* eslint check
2019-09-16 05:58:58 -03:00
Ahmed Tarek d74385f1c8 🐛Fix request finally documentation in README (#2189) 2019-09-13 10:19:43 -03:00
Joshua Melvin 1b07fb9365 Fixing issue 2195 - order of if/else blocks is causing unit tests mocking XHR. (#2201) 2019-09-13 09:35:59 -03:00
Fabio Aiello c454e9f526 updating spelling and adding link to docs (#2212) 2019-09-13 09:31:49 -03:00
Vamp e3a7116f14 upadating README: notes on CommonJS autocomplete (#2256)
closes #2226. add note on how to gain typings / autocomplete / intellisense when using CommonJS (`require()`) imports
2019-09-13 09:28:14 -03:00
Lucas 488a4598a3 Sintaxe alternative to send data into the body (#2317) 2019-09-13 09:19:16 -03:00