Fix 'body_utf8'
This commit is contained in:
parent
2727eca37e
commit
cab2e0e67c
1 changed files with 2 additions and 2 deletions
|
@ -83,8 +83,8 @@ func start_download(id: int, parse_utf8: bool) -> void:
|
|||
download.accept_gzip = true
|
||||
download.use_threads = true
|
||||
var lambda: Callable = func(result: int, http_code: int, headers: PackedStringArray, body: PackedByteArray, httprequest: HTTPRequest) -> void:
|
||||
logger.verbf("erm", "Request " + str(id) + " completed\nResult: " + str(result) + "\nHTTP response code: " + str(http_code) + "\nHeaders: " + str(headers.size()) + "\nBody size: " + str(body.size()) + " Bytes // " + str(core.misc.byte2mib(body.size(), true)) + " MiB")
|
||||
list_complete.merge({ id: { "result": result, "http_code": http_code, "headers": headers, "body": body, "body_utf8": body.get_string_from_utf8() if !parse_utf8 else "" } })
|
||||
logger.verbf("erm", "Request " + str(id) + " completed\nResult: " + str(result) + "\nHTTP response code: " + str(http_code) + "\nHeaders: " + str(headers.size()) + "\nBody size: " + str(body.size()) + " Bytes // " + str(core.misc.byte2mib(body.size(), true)) + " MiB\nParse body as UTF-8: " + str(parse_utf8))
|
||||
list_complete.merge({ id: { "result": result, "http_code": http_code, "headers": headers, "body": body, "body_utf8": body.get_string_from_utf8() if parse_utf8 else "" } })
|
||||
list_active.erase(id)
|
||||
remove_child(httprequest)
|
||||
httprequest.queue_free()
|
||||
|
|
Loading…
Reference in a new issue