HttpClient
Constructors
Link copied to clipboard
constructor(userAgent: String = definedExternally, handlers: ERROR CLASS: Symbol not found for ReadonlyArray<actions/http/client/RequestHandler> = definedExternally, requestOptions: RequestOptions = definedExternally)
Functions
Link copied to clipboard
Link copied to clipboard
fun <T> getJson(requestUrl: String, additionalHeaders: ERROR CLASS: Symbol not found for node.http.OutgoingHttpHeaders = definedExternally): ERROR CLASS: Symbol not found for Promise<actions/http/client/TypedResponse<T>>
Gets a typed object from an endpoint Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise
Link copied to clipboard
fun request(verb: String, requestUrl: String, data: ERROR CLASS: Symbol not found for node.ReadableStream??, headers: ERROR CLASS: Symbol not found for node.http.OutgoingHttpHeaders = definedExternally): ERROR CLASS: Symbol not found for Promise<actions/http/client/HttpClientResponse>
fun request(verb: String, requestUrl: String, data: String?, headers: ERROR CLASS: Symbol not found for node.http.OutgoingHttpHeaders = definedExternally): ERROR CLASS: Symbol not found for Promise<actions/http/client/HttpClientResponse>
Makes a raw http request. All other methods such as get, post, patch, and request ultimately call this. Prefer get, del, post and patch
Link copied to clipboard
fun requestRaw(info: RequestInfo, data: ERROR CLASS: Symbol not found for node.ReadableStream??): ERROR CLASS: Symbol not found for Promise<actions/http/client/HttpClientResponse>
fun requestRaw(info: RequestInfo, data: String?): ERROR CLASS: Symbol not found for Promise<actions/http/client/HttpClientResponse>
Raw request.
Link copied to clipboard
fun requestRawWithCallback(info: RequestInfo, data: ERROR CLASS: Symbol not found for node.ReadableStream??, onResult: (@R|kotlin/ParameterName|(name = String(err)) ERROR CLASS: Symbol not found for JsError??, res: HttpClientResponse?) -> Unit)
fun requestRawWithCallback(info: RequestInfo, data: String?, onResult: (@R|kotlin/ParameterName|(name = String(err)) ERROR CLASS: Symbol not found for JsError??, res: HttpClientResponse?) -> Unit)
Raw request with callback.
Link copied to clipboard
fun sendStream(verb: String, requestUrl: String, stream: ERROR CLASS: Symbol not found for node.ReadableStream, additionalHeaders: ERROR CLASS: Symbol not found for node.http.OutgoingHttpHeaders = definedExternally): ERROR CLASS: Symbol not found for Promise<actions/http/client/HttpClientResponse>