Commit Graph

23 Commits

Author SHA1 Message Date
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
Jay
8699891b8e Fixed merge conflicts 2022-04-01 18:40:12 +02:00
Dmitriy Mozgovoy
6b9b05b907
Improved FormData support; (#4448)
* Fixed isFormData predicate;
Added support for automatic object serialization to FormData if `Content-Type` is `multipart/form-data`;
Added support for FormData to be overloaded using `config.env.FormData` option;
Added support for FormData in node.js environment through `form-data` package;

* Added the `form-data` package as a dependency for the server build;
Added tests for FormData payload;

* Added FormData automatic serialization section;
Refactored cancellation section;

* Reworked toFormData helper;
Expose toFormData helper as a static method;
Refactored transform request;
Added kindOf, kindOfTest, endsWith, isTypedArray util;
Refactored utils.js to use kindOf for tests;

* Fixed isFormData predicate; (#4413)

Added support for automatic object serialization to FormData if `Content-Type` is `multipart/form-data`;
Added support for FormData to be overloaded using `config.env.FormData` option;
Added support for FormData in node.js environment using `form-data` package;

(cherry picked from commit 73e3bdb883)

* Added shortcut methods `postForm`, `putForm`, `patchForm` to submit a Form;
Added ability to submit FileList object as a FormData;
Updated README.md;

* Updated README.md;
2022-03-14 20:22:10 +02:00
Jay
340ad9ec8c Fixed merge conflict 2022-03-09 19:57:04 +02:00
sakarit
bdb7d76d40
Adding baseURL to be used in getUri(), also removing question mark trimming since there seems to be no obvious reason for it. (#3737)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-03-07 20:09:23 +02:00
DigitalBrainJS
7f1236652a Refactored AxiosError to a constructor;
Refactored `Cancel` to a constructor, a subclass of the `AxiosError`;
Expose CanceledError class;
Refactored axios error codes;
Added `toFlatObject` util;
2021-10-14 19:15:16 +03:00
Jay
76f09afc03
Release/v0.22.0 (#4107)
* fix/Avoid package.json import; (#4041)

* Added auto-generated config module `env/data.js` for importing package environment vars without importing the whole `package.json`;
Refactored `http.js` to use `env/data.js` instead of package.json;

* Added `env/data.js`;
Added `env/README.md`;

* Feat/export package version constant (#4065)

* Added auto-generated config module `env/data.js` for importing package environment vars without importing the whole `package.json`;
Refactored `http.js` to use `env/data.js` instead of package.json;

* Added `env/data.js`;
Added `env/README.md`;

* Export package version constant;

* Fixed cancelToken leakage; Added AbortController support; (#3305)

* Fixed cancelToken leakage;
Added AbortController support;

* Fixed typings;

* Documented `signal` option;

* Added processing of early cancellation using AbortController without sending a request;

Co-authored-by: Jay <jasonsaayman@gmail.com>

* Updating CI to run on release branches

* Fixed default transitional config for custom Axios instance; (#4052)

Refactored `/core/mergeConfig`;

Co-authored-by: Jay <jasonsaayman@gmail.com>

* Prepping v0.22.0 for release

* Updated date

Co-authored-by: Dmitriy Mozgovoy <robotshara@gmail.com>
2021-10-01 08:02:13 +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
Felipe Martins
c282e7ea8e
Fix cancellation error on build master. #2290 #2207 (#2407) 2019-09-12 23:45:06 -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
Nick Uraltsev
46a9639ef2 Fixing sporadically failing tests 2016-10-29 21:58:06 -07:00
Nick Uraltsev
216e2a6787 Adding axios.isCancel method 2016-09-21 18:47:37 -07:00
Nick Uraltsev
72dd897bb5 Adding cancellation support 2016-09-17 11:52:56 -07:00
Nick Uraltsev
8f0973c6b9 Fixing failing test 2016-08-09 23:23:08 -07:00
Matt Zabriskie
1725e0808d Fixing broken test 2016-06-23 16:30:08 -06:00
Matt Zabriskie
6161754326 Instances created from axios.create have same API as default axios
closes #217
2016-06-23 15:43:42 -06:00
Matt Zabriskie
46eee269da Fixing custom instance defaults
closes #341
2016-06-23 15:19:10 -06:00
Matt Zabriskie
dcbb352262 Moving test helpers and auto-loading them 2016-03-07 13:21:27 -07:00
Matt Zabriskie
dc07ef2559 Fixing tests for IE 2016-03-05 23:17:39 -07:00
Matt Zabriskie
371b82a2a0 Cleaning up tests a bit 2016-03-04 10:35:05 -07:00
Matt Zabriskie
f9c46c5c1d Adding tests for interceptors on custom instances 2015-12-11 13:52:23 -07:00
Nick Uraltsev
4ac0fbd1c1 Rename axios.createNew to axios.create 2015-10-23 08:40:46 -07:00
Nick Uraltsev
b10874fa67 Make axios instantiable 2015-10-03 09:38:16 -07:00