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

    Interface HttpOptions

    Configuration options for HTTP requests

    const http = platform.get(PlatformServiceName.Http);
    const options: HttpOptions = {
    params: { search: 'John', limit: '10' },
    headers: { 'X-Custom-Header': 'value' },
    responseType: 'json'
    };
    const data = await http.get('my_addon/users', options);
    interface HttpOptions {
        headers?: HttpHeaders;
        params?: HttpParams;
        responseType?: HttpResponseType;
    }
    Index

    Properties

    headers?: HttpHeaders

    Additional HTTP headers to include in the request

    const headers = {
    'Authorization': 'Bearer token123',
    'Accept-Language': 'en-US'
    };
    params?: HttpParams

    Query parameters to append to the URL

    Parameters will be URL-encoded and appended to the request URL.

    // Results in: my_addon/users?active=true&role=admin&role=user
    const params = {
    active: 'true',
    role: ['admin', 'user']
    };
    responseType?: HttpResponseType

    Expected response data type. Defaults to 'json'

    • json: Parse response as JSON (default)
    • text: Get response as plain text string
    • blob: Get response as binary Blob (for file downloads)
    • arraybuffer: Get response as ArrayBuffer (for binary data processing)
    // Download PDF file
    const pdfBlob = await http.get('my_addon/report.pdf', {
    responseType: 'blob'
    });