interface HttpsRequestOptions {
    allowLargeResponse?: boolean;
    body?: HttpsRequestObject | HttpsFormDataParam[] | File;
    cachePolicy?: CachePolicy;
    content?: any;
    cookiesEnabled?: boolean;
    headers?: Headers;
    method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD";
    onProgress?: ((current, total) => void);
    params?: HttpsRequestObject;
    responseOnMainThread?: boolean;
    tag?: string;
    timeout?: number;
    url: string;
}

Hierarchy

  • HttpRequestOptions
    • HttpsRequestOptions

Properties

allowLargeResponse?: boolean

On Android large responses may crash the app (fi. https://httpbin.org/bytes/10000). By setting this to true and when not using useLegacy, we allow large responses on the main thread (which this plugin currently does). Note that once set to true, this policy remains active until the app is killed.

cachePolicy?: CachePolicy
content?: any

content can be used to pass native custom okhttp3.RequestBody

cookiesEnabled?: boolean

default to true. Android and iOS only store cookies in memory! it will be cleared after an app restart

headers?: Headers
method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD"
onProgress?: ((current, total) => void)

iOS for now

Type declaration

    • (current, total): void
    • Parameters

      • current: number
      • total: number

      Returns void

responseOnMainThread?: boolean

default to true. Put to false to run response callback on current thread

tag?: string
timeout?: number

Default 10 (seconds).

url: string