Fix 'body_utf8'
This commit is contained in:
parent
0ee7198845
commit
1febf32f73
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.accept_gzip = true
|
||||||
download.use_threads = true
|
download.use_threads = true
|
||||||
var lambda: Callable = func(result: int, http_code: int, headers: PackedStringArray, body: PackedByteArray, httprequest: HTTPRequest) -> void:
|
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")
|
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_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)
|
list_active.erase(id)
|
||||||
remove_child(httprequest)
|
remove_child(httprequest)
|
||||||
httprequest.queue_free()
|
httprequest.queue_free()
|
||||||
|
|
Loading…
Reference in a new issue