Skip to content

Add to axios defaults instead of overwriting them #4208

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

Merged
merged 1 commit into from
Apr 7, 2017

Conversation

misenhower
Copy link
Contributor

This change ensures the default "Accept" header specified by axios is retained.

Previously, checking $request->wantsJson() on a request made from axios would return false since the "Accept: application/json... (etc)" header was omitted.

This change uses the format specified in the axios docs here https://github.com/mzabriskie/axios#global-axios-defaults

This change ensures the default "Accept" header specified by axios is retained.
@antonkomarev
Copy link
Contributor

@misenhower thank you for this catch!

@taylorotwell taylorotwell merged commit c6e3d6e into laravel:master Apr 7, 2017
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.

3 participants