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

Make the raw body string available #39

Closed
wants to merge 1 commit into from

Conversation

richthegeek
Copy link

As far as I can tell, getting the raw body is currently impossible - using the "raw-body" module seems to return false regardless of what I do.

This puts it onto the req object should you want to use it directly instead of after parsing in cases where you need to do so (for example, HMAC checking)

@dougwilson
Copy link
Contributor

for example, HMAC checking

have you tried the verify option yet?

@charyorde
Copy link

Can you please provide some example?

I'm looking at should error from verify in https://github.com/expressjs/body-parser/blob/master/test/raw.js , but can't make a sense of it yet.

The question is how to use buf to make sure I get the raw request body (which is like this: username=myname&password=mypass) without having it transformed to json.

@dougwilson
Copy link
Contributor

@charyorde please open a new issue, with a lot more information for me to go on, rather than resurrecting a really old issue.

@dougwilson dougwilson self-assigned this Feb 23, 2015
@expressjs expressjs locked and limited conversation to collaborators Feb 23, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants