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

fix: allow single parameter on setRequestBody #6728

Merged
merged 4 commits into from
Jul 13, 2023
Merged

Conversation

jcesarmobile
Copy link
Member

The public setRequestBody method was modified to add a new parameter, but since it's public it can break (and breaks on iOS) plugins or custom user code using the method with less parameters.

This PR allows to keep using the previous number of parameters.

Also adds a null check on Android for bodyType as you can't call .equals on a null object and bodyType can be null since it's marked as optional on the types, so the call to getString() where it gets the value could return null.

closes #6727
closes ionic-team/capacitor-plugins#1682

@jcesarmobile jcesarmobile merged commit 5343bdb into main Jul 13, 2023
@jcesarmobile jcesarmobile deleted the restore-params branch July 13, 2023 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants