Class MessageAbstract

Hierarchy

Constructors

  • Parameters

    • Rest ...args: string[]

      The path arguments

    Returns Message

Properties

_responseType: null | ResponseBodyType = null
_tokenStorage: null | TokenStorage = null
progressCallback: null | ProgressListener = null
request: Request
withCredentials: boolean = false
BINARY: {
    arraybuffer: boolean;
    base64: boolean;
    blob: boolean;
    buffer: boolean;
    data-url: boolean;
    stream: boolean;
} = ...

Type declaration

  • arraybuffer: boolean
  • base64: boolean
  • blob: boolean
  • buffer: boolean
  • data-url: boolean
  • stream: boolean
StatusCode: {
    BAD_CREDENTIALS: number;
    BUCKET_NOT_FOUND: number;
    FORBIDDEN: number;
    INVALID_PERMISSION_MODIFICATION: number;
    INVALID_TYPE_VALUE: number;
    NOT_MODIFIED: number;
    OBJECT_NOT_FOUND: number;
    OBJECT_OUT_OF_DATE: number;
    PERMISSION_DENIED: number;
    QUERY_DISPOSED: number;
    QUERY_NOT_SUPPORTED: number;
    SCHEMA_NOT_COMPATIBLE: number;
    SCHEMA_STILL_EXISTS: number;
    SCRIPT_ABORTION: number;
    SYNTAX_ERROR: number;
    TRANSACTION_INACTIVE: number;
    TYPE_ALREADY_EXISTS: number;
    TYPE_STILL_REFERENCED: number;
} = StatusCode

Type declaration

  • BAD_CREDENTIALS: number
  • BUCKET_NOT_FOUND: number
  • FORBIDDEN: number
  • INVALID_PERMISSION_MODIFICATION: number
  • INVALID_TYPE_VALUE: number
  • NOT_MODIFIED: number
  • OBJECT_NOT_FOUND: number
  • OBJECT_OUT_OF_DATE: number
  • PERMISSION_DENIED: number
  • QUERY_DISPOSED: number
  • QUERY_NOT_SUPPORTED: number
  • SCHEMA_NOT_COMPATIBLE: number
  • SCHEMA_STILL_EXISTS: number
  • SCRIPT_ABORTION: number
  • SYNTAX_ERROR: number
  • TRANSACTION_INACTIVE: number
  • TYPE_ALREADY_EXISTS: number
  • TYPE_STILL_REFERENCED: number

Accessors

  • get isBinary(): boolean
  • Returns boolean

  • get spec(): MessageSpec
  • Returns the specification of this message

    Returns MessageSpec

Methods

  • Gets the request accept header

    Returns

    Returns string

  • Sets the request accept header

    Returns

    This message object

    Parameters

    • accept: string

      the accept header value

    Returns Message

  • Gets the ACL of a file into the Baqend-Acl header

    Returns

    Returns string

  • Sets and encodes the ACL of a file into the Baqend-Acl header

    Returns

    This message object

    Parameters

    • acl: Acl

      the file ACLs

    Returns Message

  • Adds the given string to the request path

    If the parameter is an object, it will be serialized as a query string.

    Returns

    Parameters

    • query: string | {
          [key: string]: string;
      }

      which will added to the request path

    Returns Message

  • Gets the cache control header

    Returns

    Returns string

  • Sets the cache control header

    Returns

    This message object

    Parameters

    • value: string

      The cache control flags

    Returns Message

  • Gets the contentLength

    Returns

    Returns number

  • Sets the contentLength

    Returns

    This message object

    Parameters

    • contentLength: number

      the content length of the data

    Returns Message

  • Gets and encodes the custom headers of a file into the Baqend-Custom-Headers header

    Returns

    Returns string

  • Sets and encodes the custom headers of a file into the Baqend-Custom-Headers header

    Returns

    This message object

    Parameters

    • customHeaders: {
          [headers: string]: string;
      }

      the file custom headers

      • [headers: string]: string

    Returns Message

  • Handle the receive

    Returns

    Parameters

    • response: Response

      The received response headers and data

    Returns void

  • Sets the entity type

    Returns

    This message object

    Parameters

    • data: RequestBody

      The data to send

    • Optional type: RequestBodyType

      the type of the data one of 'json'|'text'|'blob'|'arraybuffer' defaults detect the type based on the body data

    Returns Message

  • Parameters

    • Optional eTag: null | string | number

    Returns undefined | null | string

  • Gets the value of a the specified request header

    Returns

    The header value

    Parameters

    • name: string

      The header name

    Returns string

  • Sets the value of a the specified request header

    Returns

    This message object

    Parameters

    • name: string

      The header name

    • value: null | string

      The header value if omitted the value will be returned

    Returns Message

  • Parameters

    • name: string
    • Optional value: null | string

    Returns string | Message

  • Gets the request conditional If-Match header

    Returns

    This message object

    Returns string

  • Sets the request conditional If-Match header

    Returns

    This message object

    Parameters

    • eTag: null | string | number

      the If-Match ETag value

    Returns Message

  • Gets the request a ETag based conditional header

    Returns

    Returns string

  • Sets the request a ETag based conditional header

    Returns

    This message object

    Parameters

    • eTag: string

      The ETag value

    Returns Message

  • Gets the request date based conditional header

    Returns

    Returns string

  • Sets the request date based conditional header

    Returns

    This message object

    Parameters

    • date: Date

      The date value

    Returns Message

  • Get the mimeType

    Returns

    This message object

    Returns string

  • Sets the mimeType

    Returns

    This message object

    Parameters

    • mimeType: null | string

      the mimeType of the data

    Returns Message

  • Indicates that the request should not be served by a local cache

    Returns

    Returns Message

  • Gets the request path

    Returns

    The path of the message value

    Returns string

  • Sets the request path

    Returns

    This message object

    Parameters

    • path: string

      The new path value, any query parameters provided with the path will be merged with the exiting query params

    Returns Message

  • Gets the response type which should be returned

    Returns

    This message object

    Returns null | ResponseBodyType

  • Sets the response type which should be returned

    Returns

    This message object

    Parameters

    • type: null | ResponseBodyType

      The response type one of 'json'|'text'|'blob'|'arraybuffer' defaults to 'json'

    Returns Message

  • Gets the tokenStorage which stored credentials are used to authorize this message

    Returns

    The header value

    Returns null | TokenStorage

  • Sets the tokenStorage which stored credentials are used to authorize this message

    Returns

    This message object

    Parameters

    • value: null | TokenStorage

      The new tokenStorage used to authorize this message

    Returns Message

  • Creates a new message class with the given message specification

    Returns

    A created message object for the specification

    Type Parameters

    • T

    Parameters

    Returns T

Generated using TypeDoc