22 lines
692 B
JavaScript
22 lines
692 B
JavaScript
export const getHttpHandlerExtensionConfiguration = (runtimeConfig) => {
|
|
return {
|
|
setHttpHandler(handler) {
|
|
runtimeConfig.httpHandler = handler;
|
|
},
|
|
httpHandler() {
|
|
return runtimeConfig.httpHandler;
|
|
},
|
|
updateHttpClientConfig(key, value) {
|
|
runtimeConfig.httpHandler?.updateHttpClientConfig(key, value);
|
|
},
|
|
httpHandlerConfigs() {
|
|
return runtimeConfig.httpHandler.httpHandlerConfigs();
|
|
},
|
|
};
|
|
};
|
|
export const resolveHttpHandlerRuntimeConfig = (httpHandlerExtensionConfiguration) => {
|
|
return {
|
|
httpHandler: httpHandlerExtensionConfiguration.httpHandler(),
|
|
};
|
|
};
|