Improvement
improvement: support fo binary data as a input. This do that the response process has more performance because not encoding needed.
This commit is contained in:
parent
ef9d8710f5
commit
f091d82bad
|
@ -79,6 +79,8 @@ class HTTPResponse:
|
||||||
self.content_type = content_type
|
self.content_type = content_type
|
||||||
|
|
||||||
if body is not None:
|
if body is not None:
|
||||||
|
self.body = body
|
||||||
|
if type(body) is str:
|
||||||
self.body = body.encode('utf-8')
|
self.body = body.encode('utf-8')
|
||||||
else:
|
else:
|
||||||
self.body = body_bytes
|
self.body = body_bytes
|
||||||
|
|
Loading…
Reference in New Issue
Block a user