- 15 3月, 2022 1 次提交
-
-
由 Dmitriy Mozgovoy 提交于
* 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 73e3bdb8) * 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;
-
- 11 3月, 2022 1 次提交
-
-
由 Jay 提交于
-
- 08 3月, 2022 3 次提交
-
-
由 sakarit 提交于
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: NJay <jasonsaayman@gmail.com>
-
由 João Gabriel Quaresma 提交于
* Fixing error returned when requesting illegal URL * Adding unit tests http.js * Fixing error message axios invalid request from browser * Adding unit tests requests.spec.js * Adding at utils.js a new method: getProtocol Co-authored-by: NJay <jasonsaayman@gmail.com>
-
由 Zoran Kokeza 提交于
* Adding support for beforeRedirect config option * Adding tests for beforeRedirect * Update README.md Co-authored-by: NPrabodh Meshram <prabodh.meshram7@gmail.com> * fix types Co-authored-by: NPrabodh Meshram <prabodh.meshram7@gmail.com> Co-authored-by: NJay <jasonsaayman@gmail.com>
-
- 07 3月, 2022 1 次提交
-
-
由 Dmitriy Mozgovoy 提交于
Co-authored-by: NJay <jasonsaayman@gmail.com>
-
- 13 2月, 2022 1 次提交
-
- 02 2月, 2022 1 次提交
-
-
由 Dmitriy Mozgovoy 提交于
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;
-
- 27 1月, 2022 1 次提交
-
-
由 Jay 提交于
* Removed error when url is null as this breaks current use cases for alot of projects * Removed associated tests that check for the for url to not be empty
-
- 19 1月, 2022 2 次提交
-
-
由 Daniel 提交于
* Adding errors when the query parsing process fails * Updated error * Removed unused variables Co-authored-by: NJay <jasonsaayman@gmail.com>
-
由 duibu05 提交于
* The timeoutErrorMessage property in config not work with Node.js (#3580) * Adding "should respect the timeoutErrorMessage property" test case Co-authored-by: NWill Loo <duibu05@126.com> * The timeoutErrorMessage property in config not work with Node.js (#3580) * Fixing The timeoutErrorMessage property in config not work with Node.js (#3580) * Updating http adapter * Adding reject config.timeoutErrorMessage when setup Co-authored-by: NWill Loo <duibu05@126.com> * Fixing The timeoutErrorMessage property in config not work with Node.js (#3580) * Fixing The timeoutErrorMessage property in config not work with Node.js (#3580) * Update http adapter * Make changes as suggested after code review Co-authored-by: NWill Loo <duibu05@126.com> Co-authored-by: NJay <jasonsaayman@gmail.com>
-
- 18 1月, 2022 1 次提交
-
-
由 Jay 提交于
-
- 23 12月, 2021 5 次提交
-
-
* Fixing error message when missing url * Fixing missing url * Adding missing url case * Update Axios.js * Update requests.spec.js * Update api.spec.js * Update api.spec.js * Update api.spec.js Co-authored-by: NJay <jasonsaayman@gmail.com>
-
由 Ben Carp 提交于
* adding toFormData test * adding toFormData Co-authored-by: NJay <jasonsaayman@gmail.com>
-
由 Paulo Renato 提交于
* Adding request body length validation on HTTP adapter * Removing error code assertion on HTTP's body length support test * Removed due to the error being thrown by axios itself now, instead of follow-redirects Co-authored-by: NJay <jasonsaayman@gmail.com>
-
由 Wolfram Kriesing 提交于
* Add a group for the multiple-interceptors tests. The current test contains a lot of details that are worth being tested separately and also made explicit. This is what is coming with the next changes. * Fix indentation. * Make explicit that the test only tests the interception of the fulfilled part. * Indent. * Make the test just test a tiny bit, as described. The more explicit the test, the better we can 1) describe what it does and use that for the docs to make them understandable 2) have a better explicit description of the API (in case we want to modify it) and 3) have a regression test when changing. * Add a test that explicitly shows that the order of interceptors is as they were added. * Pull out reusable code, to make the tests more explicitly stating the things they care about. * Write a test showing that the responses are not merged or anything, only the last one in the chain is returned. * Make visible that the interceptors are a chain, one receives its predecessor's data. * Test what happens when the interceptor throws. * Refactor, add another group of tests and pull helper function there. The previous change to also catch in the helper function was not needed for any of the tests above, so remove it and put it in the describe-block below where it is needed. Just trying to write the specific code needed, not more. Not sure about the impact for failing tests, I am glad about input. But the main intention here is to have minimal code, explicit tests and not too much generic code which might break itself eventually. * Documenting that the following reject-interceptor gets called. * Documenting how the interceptor chain handles caught rejections. * Document "multiple interceptors". I just extracted the test descriptions from the new/modified tests. And I also learned that I should improve the test descriptions, the tests are just in a GIVEN-WHEN-THEN structure, so I can also use those terms better. Will do this next. * Transfer the better readable descriptions as I changed them in the README back into the tests. After I had updated the README using the test descriptions I realized how the test descriptions can be improved, so I did this "moving" the learnings back into the code. * Be a bit more explicit, it was not clear when reading, imho. * Add new lines to be kinda consistent with the rest of the file. Co-authored-by: NJay <jasonsaayman@gmail.com>
-
由 Black-Hole 提交于
1. add the judgment of null Co-authored-by: NJay <jasonsaayman@gmail.com>
-
- 29 10月, 2021 1 次提交
-
-
由 Kohta Ito 提交于
* Adding test of aborts request * Adding aborted event handler * Fixing timing of setting rejected flag Co-authored-by: NJay <jasonsaayman@gmail.com>
-
- 22 10月, 2021 1 次提交
-
-
由 Rodry 提交于
* revert: change type of AxiosResponse to any * types: add back default types My bad xD * Remove redundant default params
-
- 15 10月, 2021 1 次提交
-
-
由 DigitalBrainJS 提交于
Refactored `Cancel` to a constructor, a subclass of the `AxiosError`; Expose CanceledError class; Refactored axios error codes; Added `toFlatObject` util;
-
- 12 10月, 2021 1 次提交
-
-
由 Remco Haszing 提交于
* Distinguish request and response data types * Fix Axios headers type `axios.headers` is not of the same type as `request.headers`, so a new type `AxiosDefaults` was introduced * Replace grunt-ts with dtslint This asserts that the type definitions are valid in the specified TypeScript version and above. This is the same tool that is used by DefinitelyTyped. * Remove grunt-ts * Restore typescript dependency * Fix missing semicolons Co-authored-by: NClaas Augner <github@caugner.de> Co-authored-by: NJay <jasonsaayman@gmail.com>
-
- 01 10月, 2021 1 次提交
-
-
由 Jay 提交于
* 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: NJay <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: NJay <jasonsaayman@gmail.com> * Prepping v0.22.0 for release * Updated date Co-authored-by: NDmitriy Mozgovoy <robotshara@gmail.com>
-
- 08 9月, 2021 1 次提交
-
-
由 Matt R. Wilson 提交于
* Caseless header comparing in HTTP adapter. It was adding User-Agent and removing Authorization, but only when existing headers had the exact right casing. Node uses caseless logic when managing headers. This was causing some requests to have `User-Agent` appended to the headers object and overriding provided agent strings. Also included is an update to not override the `Content-Length` if it was already defined in the options. It can be desirable to manually specify a content length that does not match the data on hand. Especially for testing. * Fix eslint error * fixup: update state UA logic Play nice with https://github.com/axios/axios/pull/3703Co-authored-by: NJay <jasonsaayman@gmail.com>
-
- 06 9月, 2021 1 次提交
-
-
由 Jay 提交于
* fix json transform when data is pre-stringified (#4020) * [Updating] incorrect JSON syntax in README.md * [Releasing] v0.21.4 Co-authored-by: NGuillaume FORTAINE <guillaume+github@fortaine.com>
-
- 05 9月, 2021 4 次提交
-
-
由 Remco Haszing 提交于
This requires TypeScript users to explicitly define the type of the data they are consuming. Before this, data was `any` by default. This means TypeScript consumers didn’t get type safety if they forgot to specify the type. Technically this is a breaking change for TypeScript users, as this will report errors if they forgot to specifiy the response type. The simplest workaround would be to explicitly set the response type to `any`, so it’s not breaking much. The `unknown` type is probably a slightly better fit, but this requires TypeScript ^3. `data` is still `any` in the very specific use case mentioned in https://github.com/microsoft/TypeScript/issues/38969Co-authored-by: NJay <jasonsaayman@gmail.com>
-
由 Carlos Chida 提交于
* Improved type-safety for AxiosRequestConfig - AxiosRequestConfig is now a generic type whose template corresponds to data Signed-off-by: NCarlos Chida <carlos.chida@starchitecture.eu> * Fixed tests - TS tests now match the behaviour described in the PR Signed-off-by: NCarlos Chida <carlos.chida@starchitecture.eu> Co-authored-by: NJay <jasonsaayman@gmail.com>
-
由 Greg Byrne 提交于
* Adding HTTP status code to error.toJSON (axios#2947) * Adding Error display div to internal server client.html Co-authored-by: NJay <jasonsaayman@gmail.com>
-
由 Julian Hollmann 提交于
-
- 21 5月, 2021 1 次提交
-
-
由 Daniel Lopretto 提交于
* removed charset setting when setting default header * Remove charset from tests Co-authored-by: Nmpark86 <dev.minuk.park@gmail.com> Co-authored-by: NJay <jasonsaayman@gmail.com> Co-authored-by: NPilot <timemachine@ctrl-c.club>
-
- 06 5月, 2021 1 次提交
-
-
由 Philipe Gouveia Paixão 提交于
* Adding parseInt to config.timeout * Fixing test message
-
- 20 4月, 2021 2 次提交
-
-
由 Dmitriy Mozgovoy 提交于
* Draft * Added support for primitive types to be converted to JSON if the request Content-Type is 'application/json'; Added throwing SyntaxError if JSON parsing failed and responseType is json; Added transitional option object; Added options validator to assert transitional options; Added transitional option `silentJSONParsing= true` for backward compatibility; Updated README.md; Updated typings; * Fixed isOlderVersion helper; Fixed typo; Added validator.spec.js; * Added forcedJSONParsing transitional option #2791 * `transformData` is now called in the default configuration context if the function context is not specified (for tests compatibility); * Added `transitional.clarifyTimeoutError` to throw ETIMEDOUT error instead of generic ECONNABORTED on request timeouts; Added support of onloadend handler if available instead of onreadystatechange; Added xhr timeout test; Fixed potential bug of xhr adapter with proper handling timeouts&errors (FakeXMLHTTPRequest failed to handle timeouts); * Removed unnecessary assertion;
-
由 Dmitriy Mozgovoy 提交于
JSON improvements: throw if JSON parsing failed; number, boolean can be passed directly as payload for encoding to JSON #2613, #61, #907 (#3688) * Draft * Added support for primitive types to be converted to JSON if the request Content-Type is 'application/json'; Added throwing SyntaxError if JSON parsing failed and responseType is json; Added transitional option object; Added options validator to assert transitional options; Added transitional option `silentJSONParsing= true` for backward compatibility; Updated README.md; Updated typings; * Fixed isOlderVersion helper; Fixed typo; Added validator.spec.js; * Added forcedJSONParsing transitional option #2791 * `transformData` is now called in the default configuration context if the function context is not specified (for tests compatibility); * Added `transitional.clarifyTimeoutError` to throw ETIMEDOUT error instead of generic ECONNABORTED on request timeouts; Added support of onloadend handler if available instead of onreadystatechange; Added xhr timeout test; Fixed potential bug of xhr adapter with proper handling timeouts&errors (FakeXMLHTTPRequest failed to handle timeouts);
-
- 18 4月, 2021 1 次提交
-
-
由 Ben Carp 提交于
-
- 29 3月, 2021 1 次提交
-
-
由 Mike Bishop 提交于
* Adding ability to omit User-Agent header * Update line to be more compact * Add unit tests for user-agent cases Co-authored-by: NJay <jasonsaayman@gmail.com>
-
- 24 3月, 2021 1 次提交
-
-
由 Daniel Lopretto 提交于
- 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: NJay <jasonsaayman@gmail.com>
-
- 01 3月, 2021 1 次提交
-
-
由 Sasha Korotkov 提交于
* 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: Nak71845 <alexandre.korotkov@kroger.com> Co-authored-by: NXianming Zhong <chinesedfan@qq.com> Co-authored-by: NJay <jasonsaayman@gmail.com>
-
- 09 12月, 2020 1 次提交
-
-
由 Daniel Lopretto 提交于
* 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: NXianming Zhong <chinesedfan@qq.com> Co-authored-by: NPilot <timemachine@ctrl-c.club> Co-authored-by: NRemco Haszing <remcohaszing@gmail.com> Co-authored-by: NXianming Zhong <chinesedfan@qq.com> Co-authored-by: NJay <jasonsaayman@gmail.com>
-
- 03 12月, 2020 1 次提交
-
-
由 Jonathan Foster 提交于
* 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
-
- 24 11月, 2020 1 次提交
-
-
由 Daniel Lopretto 提交于
* Reproducing the Vulnerability * Prevent SSRF * Cleanup * Refactor to skip duplicate code * Tests for correct passed data. * Code review changes.
-
- 03 11月, 2020 1 次提交
-
-
由 Jason Kwok 提交于
Co-authored-by: NJason Kwok <JasonHK@users.noreply.github.com>
-