@thiagohp/tapestry-5
    Preparing search index...

    Interface AjaxRequestOptions

    Type defining the options used in an AJAX request.

    interface AjaxRequestOptions {
        contentType?: string;
        data?: [key: string, value: string];
        exception?: (e: any) => void;
        failure?: (r: ResponseWrapper, message?: string) => void;
        headers?: [key: string, value: string];
        method?: string;
        success?: (r: ResponseWrapper) => void;
    }
    Index

    Properties

    contentType?: string

    Request content type. Defaults to "application/x-www-form-urlencoded".

    data?: [key: string, value: string]

    Additional key/value pairs (for the default content type). Optional.

    exception?: (e: any) => void

    Handler to invoke when an exception occurs (often means the server is unavailable). Passed the exception. Default will generate an exception message and throw an Error.

    failure?: (r: ResponseWrapper, message?: string) => void

    Handler to invoke on failure (server responds with a non-2xx code). Passed the response. Default will throw the exception.

    headers?: [key: string, value: string]

    Additional key/value pairs to be added to the request headers. Optional.

    method?: string

    HTTP method to be used ("post", "get", etc.). Default: "post".

    success?: (r: ResponseWrapper) => void

    Handler to invoke on success. Passed the ResponseWrapper object. Default: does nothing.