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

Add visit option to force FormData encoding #407

Merged
merged 1 commit into from Jan 5, 2021
Merged

Conversation

reinink
Copy link
Member

@reinink reinink commented Jan 5, 2021

Resolves #405

This PR adds a new forceFormData option to Inertia that forces Inertia to always convert the data to a FormData object, regardless of if there are files present.

Inertia.post('/users', data, {
  forceFormData: true,
})

This is useful for situations where your server-side framework needs to know what type of request is being sent.

@reinink reinink merged commit df829aa into master Jan 5, 2021
@reinink reinink deleted the force-form-data branch January 5, 2021 19:55
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