Skip to content
This repository was archived by the owner on Oct 31, 2024. It is now read-only.
This repository was archived by the owner on Oct 31, 2024. It is now read-only.

Pass additional headers #6

@thecodedrift

Description

@thecodedrift

Currently, the only way to change headers for a request is to set additional headers on the constructor

  /**
   * Provide a custom Headers object for the request. In some situations such as testing,
   * this allows you to control the response from the mock server.
   */
  headers?: OutgoingHttpHeaders | Headers;

Unfortunately, this would mean tests need to redefine the client for every test scenario if they'd like to provide custom headers on a per-call basis such as for request tracing.

What we probably need is an options outside of the Mongo Atlas API options for controlling the request. At outset, this should be fetch (for changing the fetch option at the time of the request call) and headers for adding additional headers to the request.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions