DartBridgeHTTP class
HTTP bridge — provides HTTP transport for C++ callbacks.
Backed by the Phase H commons HTTP client (rac_http_client_*) via
HTTPClientAdapter.
Properties
Methods
-
addHeader(
String key, String value) → void -
configure(
{required SDKEnvironment environment, String? apiKey, String? baseURL, String? accessToken, Map< String, String> ? defaultHeaders}) → Future<void> -
delete(
String endpoint, {Map< String, String> ? headers, bool requiresAuth = true, Duration? timeout}) → Future<HTTPResult> -
download(
String url, String destinationPath, {void onProgress(int downloaded, int total)?, Duration? timeout}) → Future< HTTPResult> -
Stream a file from
urlintodestinationPath. On non-2xx responses the file is left untouched and a failure result is returned.onProgressis best-effort (the blocking request does not chunk-report; the hook is invoked with the final size when the download completes). -
get(
String endpoint, {Map< String, String> ? headers, bool requiresAuth = true, Duration? timeout}) → Future<HTTPResult> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
post(
String endpoint, {Object? body, Map< String, String> ? headers, bool requiresAuth = true, Duration? timeout}) → Future<HTTPResult> -
put(
String endpoint, {Object? body, Map< String, String> ? headers, bool requiresAuth = true, Duration? timeout}) → Future<HTTPResult> -
removeHeader(
String key) → void -
setAccessToken(
String? token) → void -
setApiKey(
String key) → void -
shutdown(
) → void - Clear process-local HTTP credentials and configuration between SDK lifetimes. Native SDK state is reset separately by the state bridge.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → DartBridgeHTTP
-
final