Authenticated URL for accessing an HTTP service running in a sandbox.
Properties auto-refresh the token transparently when it nears expiry.
HTTP helper methods (.get, .post, etc.) inject the auth header
automatically.
When constructed by :meth:SandboxClient.service or
:meth:Sandbox.service, the object holds an internal refresher that
re-calls the API to obtain a fresh token before the current one expires.
Example::
svc = sb.service(port=3000)
resp = svc.get("/api/data") # token injected + auto-refreshed
print(svc.browser_url) # always-fresh URL
ServiceURL(
self,
browser_url: str,
service_url: str,
token: str,
expires_at: str,
*,
_refresher: Optional[Callable[[], ServiceURL]] = None
)Make an HTTP request to the service, injecting the auth header.
HTTP GET to the service.
HTTP POST to the service.
HTTP PUT to the service.
HTTP PATCH to the service.
HTTP DELETE to the service.
Create a ServiceURL from API response dict.