Echo request body back.
()
| 84 | |
| 85 | @app.route("/echo", methods=["POST"]) |
| 86 | async def echo(): |
| 87 | """Echo request body back.""" |
| 88 | body = await request.get_data() |
| 89 | content_type = request.headers.get("content-type", "application/octet-stream") |
| 90 | response = await make_response(body) |
| 91 | response.headers["Content-Type"] = content_type |
| 92 | return response |
| 93 | |
| 94 | |
| 95 | @app.route("/headers") |
nothing calls this directly
no test coverage detected