mirror of
https://github.com/Orange-OpenSource/hurl.git
synced 2024-12-18 08:02:12 +03:00
48447ce744
Signed-off-by: Rached Mejri <rached.mejri@orange.com>
24 lines
524 B
Python
24 lines
524 B
Python
from app 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
|
|
|
|
|
|
@app.route("/empty_bytes")
|
|
def empty_bytes():
|
|
result = BytesIO()
|
|
result.write(b"")
|
|
data = result.getvalue()
|
|
resp = make_response(data)
|
|
resp.content_type = "application/octet-stream"
|
|
return resp
|