@fluentity/core
    Preparing search index...

    Class RestAdapter

    A static HTTP client class that provides methods for making HTTP requests with built-in caching, interceptors, and request/response handling capabilities.

    Implements

    Index

    Constructors

    Properties

    Accessors

    Methods

    Constructors

    Properties

    options: RestAdapterOptions = ...

    The options for the adapter. Contains configuration settings specific to the adapter implementation.

    Accessors

    Methods

    • Makes an HTTP request to the specified URL with optional request options. Handles caching, interceptors, and error handling.

      Type Parameters

      • T = any

      Parameters

      • queryBuilder: QueryBuilder

        Optional request configuration

      Returns Promise<AdapterResponse>

      A promise that resolves to the response data

      Error if baseUrl is not configured or if the request fails

    • Removes a specific URL from the cache.

      Parameters

      • url: string

        The URL to remove from the cache

      Returns void

    • Retrieves cached data for a specific URL.

      Type Parameters

      • T = any

      Parameters

      • url: string

        The URL to get cached data for

      Returns CacheData

      The cached data if it exists