Architecture: ApiClient autoload (HTTP + JWT + error contract) #29
+11
-4
@@ -74,10 +74,17 @@ var timeout_seconds: float = 10.0
|
|||||||
|
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
_base_url = str(ProjectSettings.get_setting(
|
# Environment variable override (e.g. for headless smoke tests against a
|
||||||
"application/agp/api_base_url",
|
# backend on a non-default port). Falls back to the ProjectSetting, then
|
||||||
"http://127.0.0.1:8000"
|
# to the documented default.
|
||||||
)).rstrip("/")
|
var env_url := OS.get_environment("AGP_API_BASE_URL")
|
||||||
|
if env_url != "":
|
||||||
|
_base_url = env_url.rstrip("/")
|
||||||
|
else:
|
||||||
|
_base_url = str(ProjectSettings.get_setting(
|
||||||
|
"application/agp/api_base_url",
|
||||||
|
"http://127.0.0.1:8000"
|
||||||
|
)).rstrip("/")
|
||||||
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user