axios-axios/lib/helpers
Dmitriy Mozgovoy 5ad6994da3
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);
2021-04-19 18:55:34 +02:00
..
bind.js Moving bind into it's own file 2015-12-14 20:06:16 -07:00
buildURL.js Fixing special char encoding (#1671) 2020-05-27 14:37:39 +02:00
combineURLs.js Fixing combineURLs to support an empty relativeURL (#581) 2016-12-07 21:23:45 -08:00
cookies.js chore: upgrade eslint and add fix command 2018-04-06 21:50:26 -07:00
deprecatedMethod.js Using more strict eslint rules 2015-12-14 20:06:57 -07:00
isAbsoluteURL.js Add isAbsoluteURL helper 2015-11-21 19:29:53 -08:00
isAxiosError.js Adding a type guard for AxiosError (#2949) 2020-11-03 10:01:07 +02:00
isURLSameOrigin.js Remove unnecessary XSS check introduced by #2451 (#2679) 2020-01-20 09:20:33 -07:00
normalizeHeaderName.js Adding support for URLSearchParams 2016-05-07 12:26:28 -07:00
parseHeaders.js Revert "Update Webpack + deps, remove now unnecessary polyfills" (#2479) 2019-10-25 11:34:47 -03:00
README.md Adding README to modules 2016-06-01 13:16:16 -06:00
spread.js Using more strict eslint rules 2015-12-14 20:06:57 -07:00
validator.js JSON improvements: throw if JSON parsing failed; number, boolean can be passed directly as payload for encoding to JSON #2613, #61, #907 (#3688) 2021-04-19 18:55:34 +02:00

axios // helpers

The modules found in helpers/ should be generic modules that are not specific to the domain logic of axios. These modules could theoretically be published to npm on their own and consumed by other modules or apps. Some examples of generic modules are things like:

  • Browser polyfills
  • Managing cookies
  • Parsing HTTP headers