Skip to content

improves coverage and API of httpRequest #576

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

Merged
merged 2 commits into from
Feb 23, 2016
Merged

improves coverage and API of httpRequest #576

merged 2 commits into from
Feb 23, 2016

Conversation

flovilmart
Copy link
Contributor

Bumps code coverage > 90% 🎉

options.uri = options.url;
delete options.url;
}
delete options.uri; // not supported
Copy link
Contributor

Choose a reason for hiding this comment

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

You sure this isn't going to break anything?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Uri is not supported in Parse.Cloud.httpRequest AFAIK

Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@drew-gross
Copy link
Contributor

request has a json option that might help simplify some of these tests, fyi.

@flovilmart
Copy link
Contributor Author

For the body: The body of the request. If it is a JSON object, then the Content-Type set in the headers must be application/x-www-form-urlencoded or application/json. You can also set this to a {@link Buffer} object to send raw bytes. If you use a Buffer, you should also set the Content-Type header explicitly to describe what these bytes represent.
I should not set the content type, and provide an URL encoding of the body if the header is application/x-www-form-urlencoded
This was not supported before.

- Now the body encoding is inferred on the headers as supposed
@facebook-github-bot
Copy link

@flovilmart updated the pull request.

drew-gross added a commit that referenced this pull request Feb 23, 2016
improves coverage and API of httpRequest
@drew-gross drew-gross merged commit b1c2d9d into parse-community:master Feb 23, 2016
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.

3 participants