Http Request
class HttpRequest(url: String, method: String, headers: MutableMap<String, String> = mutableMapOf<String, String>(), body: MutableMap<String, Any> = mutableMapOf<String, Any>())
The SDK's blocking HTTP transport, used by io.portalhq.android.utils.requesters.HttpRequester for the synchronous Api methods (ejectClient, getEnabledDapps, getNetworks), by Provider's Portal API calls, and for third-party services such as Google Drive.
Timeouts: bounded by applyPortalTimeouts. HttpURLConnection defaults both to 0, meaning infinite, so a host that accepts the TCP connection and never answers would otherwise block until process death — and unlike the suspend transport there is no dispatcher between that read and the caller's own thread.
Constructors
Link copied to clipboard
constructor(url: String, method: String, headers: MutableMap<String, String> = mutableMapOf<String, String>(), body: MutableMap<String, Any> = mutableMapOf<String, Any>())