The ajax interface is used to make ajax calls. Not supported server side. Use external API for this.

Hierarchy

  • Ajax

Methods

Methods

  • Performs a get request.

    Parameters

    • url: string

      The url to call.

    • data: Record<string, string>

      The query string data.

    • callback: ((data) => void)

      The callback with the parsed data or null if the call failed.

        • (data): void
        • Parameters

          • data: unknown

          Returns void

    • sync: boolean

      Flag indicating if the call should be synchronous or not.

    Returns void

  • Performs a post request.

    Parameters

    • url: string

      The url to call.

    • data: unknown

      The data object to send. Will be serialized to JSON.

    • callback: ((data) => void)

      The callback with the parsed data or null if the call failed.

        • (data): void
        • Parameters

          • data: any

          Returns void

    • sync: boolean

      Flag indicating if the call should be synchronous or not.

    Returns void

  • Performs a generic request where the method can be specified.

    Parameters

    • url: string

      The url to call.

    • callback: ((data) => void)

      The callback with the parsed data or null if the call failed.

        • (data): void
        • Parameters

          • data: any

          Returns void

    • method: string

      The HTTP method to use.

    • data: unknown

      The data to send. Should be already serialized to JSON or any other format which is supported.

    • sync: boolean

      Flag indicating if the call should be synchronous or not.

    Returns void

Generated using TypeDoc