Skip to content

ability to pass specific headers #433

@heaversm

Description

@heaversm

I am using an API that requires the API Key to be passed in the headers (doesn't seem to support the .auth([API_KEY]) method provided by this module). How do I pass the key in the headers? Here's my current implementation:

const sdk = require("api")("@sublimesecurity/v0.3#49y4gl02wflaz");
sdk.server("https://emailrep.io");
sdk
    .auth(API_KEY) //MH TODO: doesn't seem to change rate limiting, is this working?
    .get(`/${email}`)
    .then((data) => { ... })

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:coreIssues related to `core`, which is the package that powers the SDKs at runtimegood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions