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

If source.method is "post", use HTTP POST method #21010

Closed
wants to merge 1 commit into from

Conversation

dignite
Copy link
Contributor

@dignite dignite commented Sep 7, 2018

The React Native Web View takes a method option to determine if HTTP GET or HTTP POST should be used.
For iPhone this is not case sensitive, meaning that method: "post" is allowed.
For Android "post" is not understood and therefore the request will be using HTTP GET.

I suggest we ignore case for the method, or throw an Exception.

Test Plan:

Given that I add a <WebView /> with source.method as lowercase "post" and source.uri as http://httpbin.org/post
When I view the WebView
Then the web view should show post data
It should not say "Method not allowed"

Release Notes:

[ANDROID] [BUGFIX] [WebView] - Use postUrl if method is "post"

The React Native Web View takes a method option to determine if HTTP GET or HTTP POST should be used.
For iPhone this is not case sensitive, meaning that `method: "post"` is allowed.
For Android "post" is not understood and therefore the request will be using HTTP GET.

I suggest we ignore case for the method, or throw an Exception.
@facebook-github-bot
Copy link
Contributor

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@react-native-bot react-native-bot added 🌐Networking Related to a networking API. ✅Test Plan Missing Changelog This PR appears to be missing a changelog, or they are incorrectly formatted. labels Sep 7, 2018
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 7, 2018
@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@react-native-bot react-native-bot added ✅Release Notes and removed Missing Changelog This PR appears to be missing a changelog, or they are incorrectly formatted. labels Sep 7, 2018
@dulmandakh
Copy link
Contributor

@facebook-github-bot shipit

@facebook-github-bot facebook-github-bot added the Import Started This pull request has been imported. This does not imply the PR has been approved. label Sep 7, 2018
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dulmandakh is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@react-native-bot
Copy link
Collaborator

@dignite merged commit 6e7ffff into facebook:master.


Once this commit is added to a release, you will see the corresponding version tag below the description at 6e7ffff. If the commit has a single master tag, it is not yet part of a release.

@facebook facebook locked as resolved and limited conversation to collaborators Sep 7, 2018
@react-native-bot react-native-bot added the Merged This PR has been merged. label Sep 7, 2018
gengjiawen pushed a commit to gengjiawen/react-native that referenced this pull request Sep 14, 2018
Summary:
The React Native Web View takes a method option to determine if HTTP GET or HTTP POST should be used.
For iPhone this is not case sensitive, meaning that `method: "post"` is allowed.
For Android "post" is not understood and therefore the request will be using HTTP GET.

I suggest we ignore case for the method, or throw an Exception.
Pull Request resolved: facebook#21010

Differential Revision: D9700895

Pulled By: hramos

fbshipit-source-id: 3fa904e7946dd40958cb44f9a234ee66cb68fab2
@hramos hramos removed Import Started This pull request has been imported. This does not imply the PR has been approved. labels Feb 6, 2019
t-nanava pushed a commit to microsoft/react-native-macos that referenced this pull request Jun 17, 2019
Summary:
The React Native Web View takes a method option to determine if HTTP GET or HTTP POST should be used.
For iPhone this is not case sensitive, meaning that `method: "post"` is allowed.
For Android "post" is not understood and therefore the request will be using HTTP GET.

I suggest we ignore case for the method, or throw an Exception.
Pull Request resolved: facebook#21010

Differential Revision: D9700895

Pulled By: hramos

fbshipit-source-id: 3fa904e7946dd40958cb44f9a234ee66cb68fab2
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. 🌐Networking Related to a networking API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants