Options
All
  • Public
  • Public/Protected
  • All
Menu

Uploader abstract class, actualy uploading logic varies per platform.

Hierarchy

  • Uploader

Index

Constructors

Methods

Constructors

constructor

Methods

Abstract post

  • post(url: string, body: string | Uint8Array, headers?: Record<string, string>): Promise<UploadResult>
  • Makes a POST request to a given url, with the given headers and body.

    Parameters

    • url: string

      The URL to make the POST request

    • body: string | Uint8Array

      The body of this post request. The body may be a stringified JSON or, most likely, a Uint8Array containing the gzipped version of said stringified JSON. We need to accept both in case the compression fails.

    • Optional headers: Record<string, string>

      Optional headers to include in the request

    Returns Promise<UploadResult>

    The status code of the response.

Generated using TypeDoc