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,7 +79,9 @@ class HTTPResponse:
|
|||
self.content_type = content_type
|
||||
|
||||
if body is not None:
|
||||
self.body = body.encode('utf-8')
|
||||
self.body = body
|
||||
if type(body) is str:
|
||||
self.body = body.encode('utf-8')
|
||||
else:
|
||||
self.body = body_bytes
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user