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

1093 Commits

Author SHA1 Message Date
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
James George f7e2a995d6 docs: minor tweak (#2404)
made the license section link up to the respective file.
2019-09-13 09:10:55 -03:00
Felipe Martins c282e7ea8e Fix cancellation error on build master. #2290 #2207 (#2407) 2019-09-12 23:45:06 -03:00
Sagar Acharya f5704fce71 Update response interceptor docs (#2399) 2019-09-12 22:30:36 -03:00
Avindra Goolcharan 6a4a85c57f Doc fixes, minor examples cleanup (#2198)
* 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
2019-09-07 09:05:26 -03:00
Rafael Renan Pacheco a11cdf4683 Fixing custom config options (#2207)
- fixes #2203
2019-09-06 21:40:04 -03:00
bushuai e50a08b2c3 Fixing set config.method after mergeConfig for Axios.prototype.request (#2383)
Inside Axios.prototype.request function, It's forced to set
method to 'get' after `mergeConfig` if config.method exists, which makes the defaults.method not effective.
2019-09-06 14:23:55 -03:00
DIO 89bd3abe9a Axios create url bug (#2290)
* Fix #2234 

* added spacing --eslint

* added test cases

* removed unexpected cases after updating the code
2019-09-06 12:45:18 -03:00
Michael Foss b9931e0a95 Fix grammar in README.md (#2271) 2019-09-06 12:42:10 -03:00
Denis Sikuler f0f68afb61 Fix a typo in README (#2384) 2019-09-06 09:55:06 -03: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
Felipe Martins 98e4acd893 Fix travis CI build (#2386) 2019-09-04 22:02:01 -03:00
Takahiro Ikeda 2ee3b48245 Fix typo in CHANGELOG.md - s/issue/issues (#2193)
- issue link is not found.
- typo: issue => issues
2019-05-31 09:20:35 -06:00
Emily Morehouse 8d0b92b267 Releasing 0.19.0 2019-05-30 10:10:06 -06:00
Emily Morehouse 3f7451ceb7 Update Changelog for release (0.19.0) 2019-05-30 10:00:25 -06:00
xlaguna f28ff933e4 Add information about auth parameter to README (#2166) 2019-05-28 10:57:59 -06:00
Daniela Borges Matos de Carvalho 5250e6e168 Add DELETE to list of methods that allow data as a config option (#2169) 2019-05-28 10:57:09 -06:00
Renan 6b0ccd13fa Update ECOSYSTEM.md - Add Axios Endpoints (#2176) 2019-05-28 10:55:33 -06:00
유용우 / CX 299e827c57 Add r2curl in ECOSYSTEM (#2141) 2019-05-15 13:40:23 -06:00
drawski fd0c959355 Unzip response body only for statuses != 204 (#1129) 2019-05-15 13:35:09 -06:00
Victor Hermes 92d231387f Update README.md - Add instructions for installing with yarn (#2036) 2019-05-07 16:17:16 -04:00
Josh McCarty ddcc2e4bc0 Fixing spacing for README.md (#2066) 2019-05-07 16:16:14 -04:00