-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Return the appropriate status code from XHR #169
Conversation
Could you also replace the error response with the actual |
In case of an error, would the client even receive a status code? I was under the impression that an error object is only passed in the case of a network navigation error. In my experiments, 4xx and 5xx server errors were still passed to the JS side with my changes. |
Oops, sorry about that, totally makes sense, the connection was ok, the response just wasn't 200. |
Return the appropriate status code from XHR
@tadeuzagallo: unfortunately you can't merge code like this. You need to use the internal tool to submit an internal diff. Otherwise this is going to be erased next time we sync |
Summary: Manually import pull request facebook#169 from github https://github.com/facebook/react-native/pull/169/files Test Plan: Just do a XMLHttpRequest
- Fix formatting of numbered list (replaces facebook#169) - Remove unused "development process" section
* Include a native module preparation guide with code scaffolding tool so that readers can jump straight into the code * Update native-modules-setup.md
Some libraries use the HTTP status code to interact with APIs. Rather than hardcoding the response code to 200, this sets the server-reported status code as the
status
property of an XHR instance.