-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Implemented response headers when using XMLHttpRequest
#382
Conversation
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 - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
Thanks! We never needed them so far so haven't implemented it. I'll pull this out on monday (or before if I'm motivated) |
…elimited by newlines rather than headers object
Didn't notice that |
int responseCode = (int)[((NSHTTPURLResponse *)response) statusCode]; | ||
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse*)response; | ||
NSDictionary *headerDict = [httpResponse allHeaderFields]; | ||
int responseCode = (int)[httpResponse statusCode]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be NSInteger, which is what the method actually returns . Not sure why we'd cast to an int (I appreciate that this was pre-existing, and not something you changed).
@vjeux any update on merging this pull request? |
Just looking into it now. Looks like it failed to land due to a unit test failure on internal CI. Probably a flaky test. I'll try re-submitting it. |
Summary: I think perhaps these were left out by mistake? Closes facebook#382 Github Author: Mike Driver <mikedriver@gmail.com> Test Plan: Imported from GitHub, without a `Test Plan:` line.
Summary: I think perhaps these were left out by mistake? Closes facebook#382 Github Author: Mike Driver <mikedriver@gmail.com> Test Plan: Imported from GitHub, without a `Test Plan:` line.
Used facebook#382 as inspiration but modified to return null instead of undefined as per the spec at https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest This unblocks use of Dropbox.js within a react-native app, as well as any other libraries that make use of these methods in XHR usage
Summary: Used facebook#382 as inspiration but modified to return null instead of undefined as per the spec at https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest This unblocks use of Dropbox.js within a react-native app, as well as any other libraries that make use of these methods in XHR usage. Closes facebook#872 Closes facebook#892 Github Author: Josh Zana <joshzana@gmail.com> Test Plan: Imported from GitHub, without a `Test Plan:` line.
I think perhaps these were left out by mistake?