APIResource

Hierarchy (View Summary)

Constructors

Properties

abortController: AbortController
ALLOWED_HTTP_METHODS: Method[] = ALLOWED_HTTP_METHODS
requestConfig: AxiosRequestConfig = {}
root: API
stack: (string | number)[] = []

Accessors

  • get first(): string | number
  • Get first element of the stack

    Returns string | number

  • get last(): string | number
  • Get last element of the stack

    Returns string | number

  • set last(val: string | number): void
  • Set last element of the stack

    Parameters

    • val: string | number

    Returns void

Methods

  • Set data

    Parameters

    • data: Partial<
          {
              comment: string;
              invoiceDetails: Invoice;
              name: string;
              userName: string;
          },
      >

    Returns this

  • Set form data

    Parameters

    • data: Partial<
          {
              comment: string;
              invoiceDetails: Invoice;
              name: string;
              userName: string;
          },
      >

    Returns this

  • Set JSON data

    Parameters

    • data: Partial<
          {
              comment: string;
              invoiceDetails: Invoice;
              name: string;
              userName: string;
          },
      >

    Returns this

  • Parameters

    • params:
          | QueryParams
          | Partial<
              {
                  comment: string;
                  invoiceDetails: Invoice;
                  name: string;
                  userName: string;
              },
          >

    Returns string