mirror of
https://github.com/thegatesbrowser/thegates.git
synced 2025-08-24 02:17:27 -04:00
api send logs
This commit is contained in:
parent
5e4a776dde
commit
fc6bf939c0
9 changed files with 97 additions and 21 deletions
|
@ -17,3 +17,19 @@ func request(url: String, callback: Callable,
|
|||
remove_child(http)
|
||||
|
||||
return err
|
||||
|
||||
|
||||
func request_raw(url: String, callback: Callable,
|
||||
data: PackedByteArray, method: int = HTTPClient.METHOD_GET) -> Error:
|
||||
var headers = []
|
||||
|
||||
var http = HTTPRequest.new()
|
||||
http.use_threads = true
|
||||
add_child(http)
|
||||
|
||||
var err = http.request_raw(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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue