add license, move folders

This commit is contained in:
Nordup 2024-05-04 00:14:24 +04:00
parent 185cc74060
commit 271c4a46a1
132 changed files with 21 additions and 0 deletions

View file

@ -0,0 +1,19 @@
extends Node
#class_name Backend
func request(url: String, callback: Callable,
body: Dictionary = {}, method: int = HTTPClient.METHOD_GET) -> Error:
var data = JSON.stringify(body)
var headers = []
var http = HTTPRequest.new()
http.use_threads = true
add_child(http)
var err = http.request(url, headers, method, data)
var res = await http.request_completed
callback.call(res[0], res[1], res[2], res[3])
remove_child(http)
return err