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

Clarified the format of payload in server.inject in the Reference doc #820

Merged

Conversation

bruderstein
Copy link
Contributor

It wasn't clear from the docs what format the payload needed to be in for a POST request. This is a tiny trivial change to the ref doc to make that clear.

@hueniverse
Copy link
Contributor

It doesn't have to be a JSON string. It can be any string or any buffer. The key is that if you have an object, you have to stringify it yourself. Feel free to adjust the language to reflect that and I'll merge.

@bruderstein
Copy link
Contributor Author

That wasn't what I was seeing (every other format gave a 400 'Invalid request payload format') , but I've just found out that was due to the fact I hadn't specified a content-type in the injected request headers. I'll change the wording.

hueniverse pushed a commit that referenced this pull request May 7, 2013
Clarified the format of payload in server.inject in the Reference doc
@hueniverse hueniverse merged commit 7f76798 into hapijs:master May 7, 2013
@bruderstein bruderstein deleted the server-inject-payload-clarify-docs branch May 18, 2013 07:03
jmonster pushed a commit to jmonster/hapi that referenced this pull request Feb 10, 2014
…ify-docs

Clarified the format of payload in server.inject in the Reference doc
@lock lock bot locked as resolved and limited conversation to collaborators Jan 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants