UNPKG

@smithy/protocol-http

Version:

[![NPM version](https://img.shields.io/npm/v/@smithy/protocol-http/latest.svg)](https://www.npmjs.com/package/@smithy/protocol-http) [![NPM downloads](https://img.shields.io/npm/dm/@smithy/protocol-http.svg)](https://www.npmjs.com/package/@smithy/protocol

23 lines (22 loc) 684 B
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(), }; };