Closed 100307009 closed 2 months ago
The example provided in the source
extends Control @export var http: AwaitableHTTPRequest func _ready() -> void: var r := await http.async_request('https://api.github.com/users/swarkin') if r.success: print(r.status_code) # 200 print(r.headers['Content-Type']) # application/json print(r.json['bio']) # fox.
throws following error: Invalid call. Nonexistent function 'async_request' in base 'Nil'.
Invalid call. Nonexistent function 'async_request' in base 'Nil'.
Adding something like
http = AwaitableHTTPRequest.new() add_child(http)
or an explicit mention that it requires an existance of a node AwaitableHTTPRequest in the scene. This should be useful for less experienced audience
I think once you get into the networking territory, especially when looking for extra addons, you should know how to fill out a @export variable, however I'll add a notice.
@export
The example provided in the source
throws following error:
Invalid call. Nonexistent function 'async_request' in base 'Nil'.
Adding something like
or an explicit mention that it requires an existance of a node AwaitableHTTPRequest in the scene. This should be useful for less experienced audience