@aws-sdk/middleware-user-agent

  • Version 3.78.0
  • Published
  • 58.4 kB
  • 3 dependencies
  • Apache-2.0 license

Install

npm i @aws-sdk/middleware-user-agent
yarn add @aws-sdk/middleware-user-agent
pnpm add @aws-sdk/middleware-user-agent

Overview

[![NPM version](https://img.shields.io/npm/v/@aws-sdk/middleware-user-agent/latest.svg)](https://www.npmjs.com/package/@aws-sdk/middleware-user-agent) [![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/middleware-user-agent.svg)](https://www.npmjs.c

Index

Variables

variable getUserAgentMiddlewareOptions

const getUserAgentMiddlewareOptions: any;

    Functions

    function getUserAgentPlugin

    getUserAgentPlugin: (config: UserAgentResolvedConfig) => Pluggable<any, any>;

      function resolveUserAgentConfig

      resolveUserAgentConfig: <T>(
      input: T & PreviouslyResolved & UserAgentInputConfig
      ) => T & UserAgentResolvedConfig;

        function userAgentMiddleware

        userAgentMiddleware: (
        options: UserAgentResolvedConfig
        ) => <Output extends MetadataBearer>(
        next: BuildHandler<any, any>,
        context: HandlerExecutionContext
        ) => BuildHandler<any, any>;
        • Build user agent header sections from: 1. runtime-specific default user agent provider; 2. custom user agent from customUserAgent client config; 3. handler execution context set by internal SDK components; The built user agent will be set to x-amz-user-agent header for ALL the runtimes. Please note that any override to the user-agent or x-amz-user-agent header in the HTTP request is discouraged. Please use customUserAgent client config or middleware setting the userAgent context to generate desired user agent.

        Interfaces

        interface UserAgentInputConfig

        interface UserAgentInputConfig {}

          property customUserAgent

          customUserAgent?: string | UserAgent;
          • The custom user agent header that would be appended to default one

          interface UserAgentResolvedConfig

          interface UserAgentResolvedConfig {}

            property customUserAgent

            customUserAgent?: UserAgent;
            • The custom user agent header that would be appended to default one

            property runtime

            runtime: string;
            • The runtime environment

            Package Files (3)

            Dependencies (3)

            Dev Dependencies (7)

            Peer Dependencies (0)

            No peer dependencies.

            Badge

            To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

            You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@aws-sdk/middleware-user-agent.

            • Markdown
              [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@aws-sdk/middleware-user-agent)
            • HTML
              <a href="https://www.jsdocs.io/package/@aws-sdk/middleware-user-agent"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>