mirror of
https://github.com/Orange-OpenSource/hurl.git
synced 2024-12-11 09:22:11 +03:00
18115d6427
We give the whole body once, instead of providing it by reading data with callback. There seems to be no performance cost (in both ways, the data is memcpy), but the timings looks much better: we can see all request having "transfer" timing. Before this, requests that have body suspicioulsy have no realistic data transfer...
10 lines
225 B
Python
10 lines
225 B
Python
from app import app
|
|
from flask import Response, request
|
|
|
|
|
|
@app.route("/post_large", methods=["POST"])
|
|
def post_large():
|
|
data = request.data
|
|
assert len(data) == 15728640
|
|
return Response(f"{len(data)}", status=200)
|