DartBridgeHTTP class
HTTP bridge - provides HTTP transport for C++ callbacks.
Matches Swift's CppBridge+HTTP.swift and HTTPService.swift.
This is the central HTTP transport layer that other bridges use. C++ can request HTTP calls via callbacks, and this bridge executes them.
Properties
- baseURL → String?
-
Get base URL
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
headers
→ Map<
String, String> -
Get all default headers
no setter
- isConfigured → bool
-
Check if HTTP is configured
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addHeader(
String key, String value) → void - Add default header
-
configure(
{required SDKEnvironment environment, String? apiKey, String? baseURL, String? accessToken, Map< String, String> ? defaultHeaders}) → Future<void> - Configure HTTP settings
-
delete(
String endpoint, {Map< String, String> ? headers, bool requiresAuth = true, Duration? timeout}) → Future<HTTPResult> - Perform DELETE request
-
download(
String url, String destinationPath, {void onProgress(int downloaded, int total)?, Duration? timeout}) → Future< HTTPResult> - Download file
-
get(
String endpoint, {Map< String, String> ? headers, bool requiresAuth = true, Duration? timeout}) → Future<HTTPResult> - Perform GET request
-
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> - Perform POST request
-
put(
String endpoint, {Object? body, Map< String, String> ? headers, bool requiresAuth = true, Duration? timeout}) → Future<HTTPResult> - Perform PUT request
-
removeHeader(
String key) → void - Remove default header
-
setAccessToken(
String? token) → void - Update access token
-
setApiKey(
String key) → void - Set API key
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → DartBridgeHTTP
-
final