Skip to content
This repository has been archived by the owner on Dec 8, 2023. It is now read-only.

Adds JSON body parsing to Request handling #20

Merged
merged 1 commit into from
Sep 9, 2015
Merged

Conversation

soundofjw
Copy link
Contributor

Adds JSON support to request body (particularly useful for processing POST requests).

Directly tested via flask handler.

@soundofjw soundofjw self-assigned this Sep 9, 2015
soundofjw added a commit that referenced this pull request Sep 9, 2015
Adds JSON body parsing to Request handling
@soundofjw soundofjw merged commit ea2c80f into master Sep 9, 2015
@soundofjw soundofjw deleted the add-json-support-19 branch September 9, 2015 00:16
@rknLA rknLA restored the add-json-support-19 branch September 9, 2015 16:09
@rknLA
Copy link
Contributor

rknLA commented Sep 9, 2015

This definitely solves a pain point, but I'm pretty keen on having this kind of stuff reviewed at this phase in the project.

There's a lot here that I need to think about in the longer term -- one of them is, how should Pale Contexts handle class methods.. The original idea behind the context is that it's a storage container, not a parser (and to be honest, my own build_args_from_request kind of violates this).

Also, there's no check here to validate that Content-Type is set to application/json before trying to decode it... What happens if someone sends application/x-www-form-urlencoded data in a request body?

@rknLA rknLA deleted the add-json-support-19 branch September 9, 2015 16:35
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.

None yet

2 participants