mirror of
https://codeberg.org/StreamGraph/StreamGraph.git
synced 2024-11-13 19:49:55 +01:00
Updated NoTwitch for HTTPResponse Changes
Adds the extra info that comes with HTTPRequest to HTTPResponse.data
This commit is contained in:
parent
1bd9c84f1e
commit
616f0646b4
1 changed files with 7 additions and 3 deletions
|
@ -51,7 +51,7 @@ func cache_user_data():
|
|||
var resp = request_user_info()
|
||||
resp.response_received.connect(func(data):
|
||||
|
||||
user_info = data
|
||||
user_info = data.data
|
||||
print("User Info Cached")
|
||||
|
||||
)
|
||||
|
@ -304,12 +304,16 @@ class HTTPResponse:
|
|||
|
||||
var info = JSON.parse_string(body.get_string_from_utf8())
|
||||
|
||||
info["result"] = result
|
||||
info["code"] = response_code
|
||||
info["headers"] = headers
|
||||
|
||||
if info.has("error"):
|
||||
|
||||
push_error("NoTwitch Twitch API Error: " + info.error + " " + info.message)
|
||||
push_error("NoTwitch Twitch API Error: " + str(info))
|
||||
return
|
||||
|
||||
info = info.data[0]
|
||||
info["data"] = info.data[0]
|
||||
|
||||
print("Response Received")
|
||||
inf_data = info
|
||||
|
|
Loading…
Reference in a new issue