hurl/integration/tests/bytes.py
2022-02-05 18:15:41 +01:00

14 lines
306 B
Python

from tests import app
from flask import make_response, request
from io import BytesIO
@app.route("/bytes")
def bytes():
result = BytesIO()
result.write(b"\x01\x02\x03")
data = result.getvalue()
resp = make_response(data)
resp.content_type = "application/octet-stream"
return resp