Skip to content

Add example for POST request #11

Description

@panw

Currently the documentation provides an example on for GET request. Can an example for POST request that demonstrates sending a payload and setting headers be add to the documentation?

Would it be something like this

from requests_threads import AsyncSession

session = AsyncSession(n=100)
async def _main():
  url = u"https://api.github.com/repos/psf/requests/issues/482/comments"
  body = json.dumps({u"body": u"Sounds great! I'll get right on it!"})
  response = await session.post(url=url, data=body)

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions