Updated SammiClient
Fixed indentation for getting Body of HTTP response. Should be outside if statement.
This commit is contained in:
parent
9315f7bce5
commit
fee6e0faf8
1 changed files with 7 additions and 7 deletions
|
|
@ -125,13 +125,13 @@ func _read_response() -> void:
|
||||||
if headers.size() == 0:
|
if headers.size() == 0:
|
||||||
return
|
return
|
||||||
|
|
||||||
var chunk := client.get_partial_data(1024)
|
var chunk := client.get_partial_data(1024)
|
||||||
if chunk[0] == OK and chunk[1].size() > 0:
|
if chunk[0] == OK and chunk[1].size() > 0:
|
||||||
buffer.append_array(chunk[1])
|
buffer.append_array(chunk[1])
|
||||||
else:
|
else:
|
||||||
response = SammiResponse.new(headers, buffer, query)
|
response = SammiResponse.new(headers, buffer, query)
|
||||||
request_completed.emit(response)
|
request_completed.emit(response)
|
||||||
state = State.CLOSED
|
state = State.CLOSED
|
||||||
|
|
||||||
|
|
||||||
class SammiResponse:
|
class SammiResponse:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue