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

1230 Commits

Author SHA1 Message Date
Jay 18e563d7f8 docs(helpers/combineURLs) 2022-06-02 20:50:41 +02:00
Jay 714daab1e7 docs(helpers/deprecatedMethod) 2022-06-02 20:50:16 +02:00
Jay ff2f0b4bd7 docs(helpers/formDataToJSON) 2022-06-02 20:49:51 +02:00
Jay a0808db951 docs(helpers/fromDataURI) 2022-06-02 20:49:21 +02:00
Jay 10c20daa2b docs(helpers/isAbsoluteURL) 2022-06-02 20:48:55 +02:00
Jay 910a920c55 docs(helpers/isAxiosError) 2022-06-02 20:48:22 +02:00
Jay 0556288a96 docs(helpers/parseHeaders) 2022-06-02 20:47:56 +02:00
Jay 5e2ffa2209 chore(helpers/spread): added docs for spread functions 2022-06-02 20:46:44 +02:00
Jay ba3e593807 chore(helpers/toFormData): added docs for to form data functions 2022-06-02 20:46:05 +02:00
Jay 34b71f0a1c chore(helpers/validator): added docs for validator function 2022-06-02 20:45:27 +02:00
Jay 74f59eac88 chore(Utils): added docs for utils functions 2022-06-02 20:44:27 +02:00
Jay 3cf6ad7203 chore(release): v1 alpha 1 2022-05-31 21:14:45 +02:00
Jay d82ea47dd3 fix(Tests): updating regex to allow for pre-releases 2022-05-31 21:12:55 +02:00
Jay e90ced4957 docs: upgrade guide and changelog updated 2022-05-29 16:57:07 +02:00
Jay afe702bccd docs: updated code of coduct, contributing gude and license for latest release version 2022-05-28 23:06:24 +02:00
Jay 9840656c59 docs: updated contributing guide to no longer contain the release section as this is not needed 2022-05-28 17:51:14 +02:00
Jay f5d4d688c1 docs: removed cookbook as this is mostly irrelevant 2022-05-28 17:46:22 +02:00
Jay c714cffa6c Update base with master (#4755)
* docs: updated code of conduct to the lates version of the contributors covenant

* docs: fixed markdown issues in changelog

* docs: updated contributors guide

* docs: fixed linting errors in docs
2022-05-28 17:25:06 +02:00
Jay 12103f8208 chore: adjusted CI to run on any current and future version branches 2022-05-28 12:09:21 +02:00
João Gabriel Quaresma 1504792765 Fixing content-type header repeated (#4745)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-05-28 11:52:50 +02:00
Victor Augusto a11f9501b8 Fix/4737/timeout error message for http (#4738)
* Fixing timeoutErrorMessage in http calls

When timeoutErrorMessage was set this did not change anything in the error message, with this change the error message will be the configured message

* Testing timeoutErrorMessage in http calls

When timeoutErrorMessage was set this did not change anything in the error message, with this change the error message will be the configured message

Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-05-28 11:46:33 +02:00
Jay 9bb016f95e chore: updated actions to run on new version based branches 2022-05-28 11:37:01 +02:00
Jay c731be7a1c chore: removed Travis CI config file as we have moved to GitHub actions 2022-05-28 11:36:08 +02:00
Dmitriy Mozgovoy a02fe284df Updated README.md; (#4742)
Updated index.d.ts;

Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-05-26 08:13:27 +02:00
dependabot[bot] 59dfed692d Bump grunt from 1.5.2 to 1.5.3 (#4743)
Bumps [grunt](https://github.com/gruntjs/grunt) from 1.5.2 to 1.5.3.
- [Release notes](https://github.com/gruntjs/grunt/releases)
- [Changelog](https://github.com/gruntjs/grunt/blob/main/CHANGELOG)
- [Commits](https://github.com/gruntjs/grunt/compare/v1.5.2...v1.5.3)

---
updated-dependencies:
- dependency-name: grunt
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-26 08:10:48 +02:00
Dmitriy Mozgovoy c008e57fe4 Added axios.formToJSON method; (#4735)
* Draft

* Added `formDataToJSON` helper;
Added `axios.formToJSON` method;
Added client tests;

Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-05-25 08:21:40 +02:00
Dmitriy Mozgovoy 934f390cc3 URL params serializer; (#4734)
* Refactored BuildURL helper to use URLSearchParams serializer;

* Updated typings;
Added TS test;
2022-05-25 08:16:38 +02:00
Dmitriy Mozgovoy 467025bdb7 Fixed bug #4727 : toFormData Blob issue on node>v17; (#4728)
* Fixed bug #4727;
Added node 18.x to the CI;
Added hotfix for `ERR_OSSL_EVP_UNSUPPORTED` issue with karma running on node >=17.x;
Added `cross-env` to allow running build and test scripts on Windows platforms;

* Added conditional setting of `--openssl-legacy-provider` option for node versions >=17.x;

* Refactored ssl-hotfix & test script;

* Fixed and refactored default max body length test due to ECONNRESET failure;

* Added test for converting the data uri to a Blob;
Fixed bug with parsing mime type for Blob;

Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-05-20 16:31:26 +02:00
Johann Cooper de973f00f3 Adding types for progress event callbacks (#4675)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-05-20 09:18:56 +02:00
Dimitris Halatsis e9c9f3392b Fix/4263/maxbodylength defaults (#4731)
* test(http): add test case for default body length in follow-redirects

* fix(http): provide proper default body length to follow-redirects

Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-05-20 08:27:37 +02:00
Dmitriy Mozgovoy c30252f685 Added data URL support for node.js; (#4725)
* Added data URL support for node.js;
Added missed data URL protocol for the browser environment;
Optimized JSON parsing in the default response transformer;
Refactored project structure;
Added `cause` prop for AxiosError instance that refers to the original error if it was wrapped with `AxiosError.from` method;
Added fromDataURI helper;
Added test for handling data:url as an `arraybuffer|text|stream`;

* Added throwing of 405 HTTP error if the method is not GET;
2022-05-20 08:04:36 +02:00
chenjigeng 63e559fa60 fix: add isCancel type assert (#4293)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-05-18 07:38:52 +02:00
Dmitriy Mozgovoy bd58c4e89b Updated eslint config; (#4722)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-05-17 08:28:40 +02:00
Dmitriy Mozgovoy bd391247b4 Added the ability for the url-encoded-form serializer to respect the formSerializer config; (#4721)
Added test for `formSerializer` config in context of `url-encoded-form` serializer;
2022-05-17 08:26:35 +02:00
Kirill Shakirov e6f9026d51 Fixing AxiosRequestHeaders typings (#4334)
Co-authored-by: Shakirov Kirill <ksshakirov@sberautotech.ru>
Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-05-16 09:33:36 +02:00
Rraji Abdelbari ee51e68143 add string[] to AxiosRequestHeaders type (#4322)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-05-16 09:21:56 +02:00
Jelle Schutter ed0ba0fd60 allow type definition for axios instance methods (#4224)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-05-16 09:08:02 +02:00
Dmitriy Mozgovoy d60d6844b1 Fixed AxiosError stack capturing; (#4718)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-05-16 08:58:47 +02:00
Dmitriy Mozgovoy 65b92958ae Fixed AxiosError status code type; (#4717)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-05-16 08:51:22 +02:00
Tom Ceuppens 9be61dc1c9 Allow webpack users to overwrite buildins (#4715)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-05-16 08:46:46 +02:00
Dmitriy Mozgovoy c05ad48952 Fixed toFormData regression bug (unreleased) with Array-like objects serialization; (#4714)
Added `toURLEncodedForm` helper;
Added automatic payload serialization to `application/x-www-form-urlencoded` to have parity with `multipart/form-data`;
Added test of handling `application/x-www-form-urlencoded` body by express.js;
Updated README.md;
Added missed param in JSDoc;
Fixed hrefs in README.md;

Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-05-16 08:30:17 +02:00
毛呆 e762cf77b3 Adding Canceler parameters config and request (#4711)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-05-16 08:19:46 +02:00
Maxime Bargiel 24f22b2b0b Fixing proxy beforeRedirect regression (#4708) 2022-05-16 08:05:56 +02:00
Adrian Wieprzkowicz 13dd93f6c5 Expand isAxiosError types (#4344)
* Expand isAxiosError types

* Fix isAxiosError types

Add missing generic type variable

* Fix typo

Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-05-12 09:19:07 +02:00
Jamie Telin c6ec5fc867 Fixing Z_BUF_ERROR when no content (#4701)
* Fix Z_BUF_ERROR when no content

* Refactored code

* Fix undefined check

Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-05-12 07:27:39 +02:00
Dmitriy Mozgovoy 807918bda2 Added enhanced toFormData implementation with additional options support; (#4704)
Updated default notation for arrays and objects to bracket style;
Added `multer/express.js` tests;
Updated README.md;

Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-05-11 19:30:08 +02:00
Maxime Bargiel 495d5fb133 Resolving proxy from env on redirect (#4436)
* Fixing http adapter to recompute proxy on redirect

Redirections can target different hosts or change the protocol
from http to https or vice versa. When the proxy option is
inferred from the environment, it should be recomputed when
the protocol or host changes because the proxy host can differ
or even whether to proxy or not can differ.

* Fixing proxy protocol handling

1) setProxy now changes request options protocol when using a proxy with explicit protocol.
2) As a result, selection of the correct transport can be simplified.
3) Legacy agent selection needs to be moved done accordingly. (Is 'agent' option even still used?)

* Using proxy-from-env library to handle proxy env vars

The proxy-from-env library is a popular, lightweight library that is
very easy to use and covers a few more cases, not to mention it has
extensive test coverage.

* Fixing proxy auth handling

* Adding test proving env vars are re-resolved on redirect

* Revert unnecessary change

* Fixing proxy beforeRedirect regression

* Fixing lint errors

* Revert "Fixing lint errors"

This reverts commit 2de3cabc60db2444e63a699bae9ec45531218a84.

* Revert "Fixing proxy beforeRedirect regression"

This reverts commit 57befc3215980e47333fedc1e9028cc22297540b.
2022-05-11 19:24:14 +02:00
Jay de5e006142 Revert "The content type option is left to the developer (#4550)" (#4699)
This reverts commit 9579bad1d3.
2022-05-09 20:16:21 +02:00
Lukas Hroch ac96144dd3 fix(types): allow to specify partial default headers for instance creation (#4185)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-05-09 20:03:05 +02:00
Dmitriy Mozgovoy 356b166182 Added blob to the list of protocols supported by the browser; (#4678)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-05-09 19:27:18 +02:00