UNPKG

@klippa/nativescript-http

Version:

The best way to do HTTP requests in NativeScript, a drop-in replacement for the core HTTP with important improvements and additions like proper connection pooling, form data support and certificate pinning

14 lines (13 loc) 683 B
import { HttpRequestOptions } from "@nativescript/core/http"; import { IWebsocketConnection, WebsocketCallbacks } from "./websocket.common"; export type { IWebsocketConnection, WebsocketCallbacks } from "./websocket.common"; export declare class WebsocketConnection implements IWebsocketConnection { private nativeConnection; constructor(nativeConnection: SRWebSocket); queueSize(): number; send(text: string): void; sendBinary(bytes: ArrayBuffer): void; close(code: number, reason: string): void; cancel(): void; } export declare function newWebsocketConnection(options: HttpRequestOptions, callbacks: WebsocketCallbacks): Promise<IWebsocketConnection>;