import { IHttpRequestCorrelator } from '@villedemontreal/auth-core'; import { IAxiosPlugin } from './IAxiosPlugin'; /** * plugin that will automatically inject a correlation ID generated by the * submitted provider into the standard "x-correlation-id" header. * Note that your correlation ID provider should rely on CLS (Continuation Local Storage) * to make the current correlation ID available to any async hooks created from * the incoming HTTP request. * @param correlator the correlator used to tag outgoing requests with a Correlation-ID header. * @example * const correlator = new HttpRequestCorrelator(); * const config: AxiosRequestConfig = { * url: 'http://localhost:4004/secured/profile' * }; * requestCorrelator(correlator).bind(config); * requestLogger(new ConsoleLogger(() => correlator.getId())).bind(config); * const response = await axios.request(config); */ export declare function requestCorrelator(correlator: IHttpRequestCorrelator): IAxiosPlugin;