This repository has been archived on 2024-09-11. You can view files and clone it, but cannot push or open issues or pull requests.
svrjs-blog-newsletter/cronjob/node_modules/@smithy/protocol-http/dist-es/extensions/httpExtensionConfiguration.js

23 lines
684 B
JavaScript
Raw Permalink Normal View History

2024-05-26 22:54:55 +02:00
export const getHttpHandlerExtensionConfiguration = (runtimeConfig) => {
let httpHandler = runtimeConfig.httpHandler;
return {
setHttpHandler(handler) {
httpHandler = handler;
},
httpHandler() {
return httpHandler;
},
updateHttpClientConfig(key, value) {
httpHandler.updateHttpClientConfig(key, value);
},
httpHandlerConfigs() {
return httpHandler.httpHandlerConfigs();
},
};
};
export const resolveHttpHandlerRuntimeConfig = (httpHandlerExtensionConfiguration) => {
return {
httpHandler: httpHandlerExtensionConfiguration.httpHandler(),
};
};