Skip to content

Conversation

@nitinbhojwani
Copy link

This PR includes:

  1. decorator json_request to parse input from request and keep it in request.data
  2. test cases for newly added decorator

Behaviour of json_request:
By default, assume_json = True and request.data = {}

     1. If assume_json is True,
            > parse request.body as JSON; if error occurs in parsing, skip.

     2. If assme_json is False,
            > If request's method is GET parse request.GET for data
            > Else If request's method is POST parse request.POST for data

vilos added a commit to vilos/django-jsonview that referenced this pull request Oct 27, 2016
@nitinbhojwani nitinbhojwani force-pushed the add-json-request-decorator branch 2 times, most recently from 9811572 to 3183068 Compare March 25, 2017 17:57
@nitinbhojwani nitinbhojwani force-pushed the add-json-request-decorator branch from 3183068 to 40623e1 Compare March 25, 2017 17:59
@nitinbhojwani
Copy link
Author

@jsocol : Please do a review.

@nitinbhojwani
Copy link
Author

Please review this PR.

@jsocol jsocol changed the base branch from master to main January 31, 2021 18:51
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.

1 participant