feat(godot): add EconomyApiClient with wallet, marketplace, and payout helpers
This commit is contained in:
@@ -138,7 +138,8 @@ func request(
|
||||
path: String,
|
||||
body: String = "",
|
||||
content_type: String = "application/json",
|
||||
require_auth: bool = false
|
||||
require_auth: bool = false,
|
||||
custom_headers: PackedStringArray = PackedStringArray()
|
||||
) -> Dictionary:
|
||||
var http := HTTPRequest.new()
|
||||
http.timeout = timeout_seconds
|
||||
@@ -152,6 +153,8 @@ func request(
|
||||
headers.append("Content-Type: " + content_type)
|
||||
if require_auth and has_token():
|
||||
headers.append("Authorization: " + bearer_token)
|
||||
for ch in custom_headers:
|
||||
headers.append(ch)
|
||||
|
||||
var url := _base_url + path
|
||||
var err := http.request(url, headers, method, body)
|
||||
|
||||
Reference in New Issue
Block a user