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

JSON requests support #3504

kasun opened this issue Nov 24, 2018 · 1 comment

JSON requests support #3504

kasun opened this issue Nov 24, 2018 · 1 comment


Copy link

@kasun kasun commented Nov 24, 2018

This is a minor enhancement when dealing with JSON requests.

Right now to do a json request we have to do something like this,

headers = {
    'Content-Type': 'application/json'
yield Request(url, method='POST', body=json.loads(data), headers=headers)

I'm proposing a new Request subclass that can save a few keystrokes.

yield JSONRequest(url, data=data)

Will be sending a PR for this.

lopuhin added a commit that referenced this issue Mar 22, 2019
[MRG+2] Request subclass for json requests #3504
Copy link

@kmike kmike commented Jun 28, 2019

Fixed by #3505 .

@kmike kmike closed this Jun 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants