Options
All
  • Public
  • Public/Protected
  • All
Menu

Module @aws-sdk/middleware-user-agent

Index

References

UserAgentInputConfig

Re-exports UserAgentInputConfig

UserAgentResolvedConfig

Re-exports UserAgentResolvedConfig

getUserAgentMiddlewareOptions

Re-exports getUserAgentMiddlewareOptions

getUserAgentPlugin

Re-exports getUserAgentPlugin

resolveUserAgentConfig

Re-exports resolveUserAgentConfig

userAgentMiddleware

Re-exports userAgentMiddleware

Variables

Const SPACE

SPACE: " " = " "

Const UA_ESCAPE_REGEX

UA_ESCAPE_REGEX: RegExp = /[^\!\#\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g

Const USER_AGENT

USER_AGENT: "user-agent" = "user-agent"

Const X_AMZ_USER_AGENT

X_AMZ_USER_AGENT: "x-amz-user-agent" = "x-amz-user-agent"

Functions

Private Const escapeUserAgent

  • escapeUserAgent(__namedParameters: [string, string]): string

Const getUserAgentPlugin

resolveUserAgentConfig

Const userAgentMiddleware

  • 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.

    Parameters

    Returns (Anonymous function)

Object literals

Const getUserAgentMiddlewareOptions

getUserAgentMiddlewareOptions: object

name

name: string = "getUserAgentMiddleware"

override

override: true = true

priority

priority: "low" = "low"

step

step: "build" = "build"

tags

tags: string[] = ["SET_USER_AGENT", "USER_AGENT"]