Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/json improvements #3763

Merged
merged 16 commits into from Apr 19, 2021
Merged

Conversation

DigitalBrainJS
Copy link
Collaborator

Just fixed the test to pass under IE11 (#3688 PR) by removing redundant assertion.

…n-primitives

� Conflicts:
�	lib/adapters/xhr.js
…est 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 typo;
Added validator.spec.js;
…n-improvements

� Conflicts:
�	lib/defaults.js
… the function context is not specified (for tests compatibility);
…tead 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);
…n-improvements

� Conflicts:
�	test/specs/transform.spec.js
@jasonsaayman jasonsaayman merged commit 7821ed2 into axios:master Apr 19, 2021
mbargiel pushed a commit to mbargiel/axios that referenced this pull request Jan 27, 2022
* 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 axios#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;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants