Use BytesIO for Response
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Michel Roux 2022-12-21 18:12:20 +00:00
parent 8475acd411
commit 2587d705fc

View File

@ -1,4 +1,4 @@
from io import StringIO
from io import BytesIO
from urllib import parse
from requests import RequestException, Response, Session, post
from .config import CLOUDPROXY_ENDPOINT
@ -42,7 +42,7 @@ class FlareRequests(Session):
if "solution" in solution:
resolved = Response()
resolved.raw = StringIO(solution["solution"]["response"].encode())
resolved.raw = BytesIO(solution["solution"]["response"].encode())
resolved.status_code = solution["solution"]["status"]
resolved.headers = solution["solution"]["headers"]
resolved.url = url