Skip to content
This repository was archived by the owner on Jan 13, 2021. It is now read-only.

Conversation

jdecuyper
Copy link
Contributor

  • Use get_response instead of getresponse for all 3 requests.
  • Add header to second request example.

>>> first = c.request('GET', '/get')
>>> second = c.request('POST', '/post', body='key=value')
>>> first = c.request('GET', '/get', body='hello')
>>> second = c.request('POST', '/post', headers={'key':'value'})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you swap these two around? It makes a bit more sense to have the body on the POST rather than the GET.

@Lukasa
Copy link
Member

Lukasa commented Apr 20, 2015

Thanks for this! One small note. =) 🍰

@Lukasa
Copy link
Member

Lukasa commented Apr 20, 2015

Actually, there's really no need to block this patch behind that, I'll just make that small change myself. =D

Lukasa added a commit that referenced this pull request Apr 20, 2015
Update stream example in documentation
@Lukasa Lukasa merged commit 23e944f into python-hyper:development Apr 20, 2015
@jdecuyper jdecuyper deleted the update-docs branch April 20, 2015 12:47
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