Check out our latest project ✨ OpenChapter.io: free ebooks the way its meant to be 📖

unirest gdscript

An asset by fenix
The page banner background of a mountain and forest
unirest gdscript hero image

Quick Information

0 ratings
unirest gdscript icon image
fenix
unirest gdscript

Unirest in GDScript: Simplified, lightweight HTTP client library. Godot Engine HTTPClient extension inspired by Kong Unirest.

Supported Engine Version
3.5
Version String
1.3
License Version
MIT
Support Level
community
Modified Date
2 years ago
Git URL
Issue URL

unirest-gdscript

Unirest in GDScript: Simplified, lightweight HTTP client library. Godot Engine HTTPClient extension inspired by Kong Unirest.

sync example

func _ready() -> void:
    var unirest_request: GetRequest = \ 
    Unirest.get("https://jsonplaceholder.typicode.com/posts/{id}") \ 
    .header("Accept", "application/json") \ 
    .route_param("id", "1")
    
    var json_response: JsonResponse = yield(
        unirest_request.as_json(),
        "completed"
    )
    var json_node: JsonNode = json_response.get_body()
    print(json_node.as_dict().get("title"))

async example

func _ready() -> void:
    var unirest_request: GetRequest = \
    Unirest.get("https://jsonplaceholder.typicode.com/posts/{id}") \
    .header("Accept", "application/json") \
    .route_param("id", "1")
    
    unirest_request.connect("completed", self, "on_completed")
    unirest_request.as_json_async()

func on_completed(json_response: JsonResponse) -> void:
    var json_node: JsonNode = json_response.get_body()
    print(json_node.as_dict().get("title"))

Unirest in GDScript: Simplified, lightweight HTTP client library. Godot Engine HTTPClient extension inspired by Kong Unirest.

Reviews

0 ratings

Your Rating

Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

0 ratings
unirest gdscript icon image
fenix
unirest gdscript

Unirest in GDScript: Simplified, lightweight HTTP client library. Godot Engine HTTPClient extension inspired by Kong Unirest.

Supported Engine Version
3.5
Version String
1.3
License Version
MIT
Support Level
community
Modified Date
2 years ago
Git URL
Issue URL

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers