https://github.com/matteopolak/godot-better-http
A simple HTTP client for Godot 4.x
https://github.com/matteopolak/godot-better-http
Last synced: 26 days ago
JSON representation
A simple HTTP client for Godot 4.x
- Host: GitHub
- URL: https://github.com/matteopolak/godot-better-http
- Owner: matteopolak
- License: mit
- Created: 2024-09-07T21:38:20.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-09-07T21:38:58.000Z (9 months ago)
- Last Synced: 2025-02-16T18:46:31.998Z (4 months ago)
- Language: GDScript
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Godot Better HTTP
A simple HTTP client for Godot 4.x.
## Usage
```gdscript
@onready var client: BetterHTTPClient = BetterHTTPClient.new(self, "https://api.mygame.com")func do_login():
# send POST to https://api.mygame.com/login with some JSON payload
var resp = await (client
.http_post("/login")
.json({
"username": "AzureDiamond",
"password": "hunter2"
})
.send())if resp.status() != 200:
return print("invalid credentials!")# parse response as json
var me = await resp.json()
```