Base class for objects representing Script data.

Unassigned
interface RemoteApiResponse {
    body: string;
    metadata: object;
    statusCode: number;
    asResource(): DynamicResource;
    getTypeName(): string;
    isOfType(type: string): boolean;
    isSame(other: ScriptObject): boolean;
}

Hierarchy (view full)

Properties

body: string
metadata: object
statusCode: number

The integer status code of the response.

The meaning of possible status code values are defined as follows:

  • 1: Success. This code corresponds to the 2XX HTTP response status codes.
  • 2: Redirected. This code corresponds to the 3XX HTTP response status codes.
  • 3: Bad request. This code corresponds to the 4XX HTTP response status codes other than 401, 403, 404, 408, 413, 414, and 431 which are mapped separately below.
  • 4: Access denied. This code corresponds to the HTTP response status codes 401 and 403.
  • 5: Not found. This code corresponds to the HTTP response status code 404. It is also returned when the API spec is not found by the remote API service.
  • 6: Timeout. This code corresponds to the HTTP response status codes 408 and 504.
  • 7: Request too large. This code corresponds to the HTTP response status codes 413, 414, and 431.
  • 8: Server error. This code corresponds to the 5XX HTTP response status codes other than 504 (timeout).
  • 9: Request cancelled by the caller.
  • 10: Internal error happened inside the remote API framework (i.e., not from the remote service being called).

All other values have undefined meaning and should be treated as internal error (code 10).

Methods

  • Converts the response into a DynamicResource object, which can be used by RemoteMediaModule to load the media content in the response body.

    Returns DynamicResource

  • Returns true if the object matches or derives from the passed in type.

    Parameters

    • type: string

    Returns boolean

  • Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

    Parameters

    Returns boolean