@atlaskit/util-service-support
Version:
A library of support classes for integrating React components with REST HTTP services
11 lines (10 loc) • 489 B
TypeScript
import { type RequestServiceOptions, type ServiceConfig } from './types';
/**
* Extracts tracing headers (x-trace-id, atl-request-id) from a Response object.
* Returns only headers that are present in the response.
*/
export declare const extractTracingHeaders: (response: Response) => Record<string, string>;
/**
* @returns Promise containing the json response
*/
export declare const requestService: <T>(serviceConfig: ServiceConfig, options?: RequestServiceOptions) => Promise<T>;