Lime Web Components API Documentation - v6.24.0
    Preparing search index...

    Variable HttpMethodConst

    HttpMethod: {
        Delete: "DELETE";
        Get: "GET";
        Patch: "PATCH";
        Post: "POST";
        Put: "PUT";
    } = ...

    HTTP method constants

    Standard HTTP methods as constant values. Useful for type-safe method selection in custom HTTP utilities.

    Type Declaration

    • ReadonlyDelete: "DELETE"
    • ReadonlyGet: "GET"
    • ReadonlyPatch: "PATCH"
    • ReadonlyPost: "POST"
    • ReadonlyPut: "PUT"
    function makeRequest(method: HttpMethod, url: string) {
    if (method === HttpMethod.Get) {
    // Handle GET request
    }
    }

    makeRequest(HttpMethod.Post, 'my_addon/endpoint');