Skip to content

Addon to ease the usage of HTTP Requests in Godot

Notifications You must be signed in to change notification settings

Swarkin/Godot-AwaitableHTTPRequest

Repository files navigation

project icon: syntax-highlighted text reading 'await http dot request'

AwaitableHTTPRequest Node for Godot 4

This addon makes HTTP requests much more convenient to use by introducing the await-syntax and removing the need for signals.

Usage

extends AwaitableHTTPRequest

func _ready() -> void:
	var resp := await async_request("https://api.github.com/users/swarkin")
	if resp.success() and resp.status_ok():
		print(resp.status)                   # 200
		print(resp.headers["content-type"])  # application/json

		var json = resp.body_as_json()
		print(json["login"])                 # Swarkin

See examples.tscn for more.


Available on the Godot Asset Library

Requires Godot 4.1

About

Addon to ease the usage of HTTP Requests in Godot

Resources

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •