Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Response<T>

Represents the results of an Adapter's data operation. Ensures each adapter returns a consistent format to the data layer for further processing (caching, error handling, etc.).

NOTE: This entire object should be serializable (i.e. no functions or complex built-in objects) so the caching layer can retrieve the full Response on subsequent calls.

Type Parameters

  • T = any

    The type of data returned.

Hierarchy

  • Response

Index

Properties

data: T

The response payload; may be null. Can be modified by setting 'responseType' on the {@link DataDefinition} object. See the spec for more information on the types that can be returned.

meta: MetaData

Additional information about the response.

status: number

A standard status code the {@link DataLayer.fetch} method will examine to determine how to proceed. For example, a status code of 0 indicates an aborted request and may prompt network diagnostics or a dialog prompting the user to restore their network connection.

statusText: string

A message that will be used to generate an Error message, if [meta.error]{@link MetaData.error} is true.