Socket
Socket
Sign inDemoInstall

@aws-sdk/middleware-header-default

Package Overview
Dependencies
3
Maintainers
5
Versions
74
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-sdk/middleware-header-default

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


Version published
Weekly downloads
329K
increased by11.82%
Maintainers
5
Created
Weekly downloads
 

Package description

What is @aws-sdk/middleware-header-default?

@aws-sdk/middleware-header-default is a middleware package for the AWS SDK for JavaScript. It allows you to set default headers for your AWS service requests, ensuring that certain headers are always included in your requests without having to manually add them each time.

What are @aws-sdk/middleware-header-default's main functionalities?

Setting Default Headers

This feature allows you to set default headers for all requests made with a specific AWS service client. In this example, a custom header 'x-custom-header' with the value 'my-custom-value' is added to all requests made with the S3 client.

const { HeaderDefaultMiddleware } = require('@aws-sdk/middleware-header-default');
const { S3Client } = require('@aws-sdk/client-s3');

const client = new S3Client({
  region: 'us-west-2',
  middlewareStack: (stack) => {
    stack.add(HeaderDefaultMiddleware({
      'x-custom-header': 'my-custom-value'
    }), {
      step: 'build',
      priority: 'high'
    });
  }
});

// Now all requests made with this client will include the 'x-custom-header' header.

Other packages similar to @aws-sdk/middleware-header-default

Changelog

Source

3.3.0 (2021-01-14)

Bug Fixes

  • clients: export explicit dependencies on @aws-sdk/types (#1902) (96f1087)
  • clients: lowercase all header names in serializer (#1892) (1308721)
  • url-parser: merge browser and node url parser, add rn url parser (#1903) (99be092)
  • util-waiters: waiters should call operation once before entering waiting (#1915) (2a6ac11)

Features

  • clients: update README with documentation, usage and more (#1907) (03be111)

Readme

Source

@aws-sdk/middleware-header-default

NPM version NPM downloads

FAQs

Last updated on 15 Jan 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc