0

I'm using python3 and aiohttp http server to handle requests from client.How should I redirect a POST request with body data?

I've tried

aiohttp.web.HTTPFound('/redirect')

it works with GET requests,but what if the request is POST?

yag
  • 11
  • 4

1 Answers1

0

You can redirect request with body, headers, etc.

HTTPFound(location, *, headers=None, reason=None, body=None, text=None, content_type=None)

See documentation: https://docs.aiohttp.org/en/stable/web_quickstart.html#exceptions

Yurii Kramarenko
  • 1,025
  • 6
  • 16