Skip to content

Request headers not being set #836

Open
@jahvi

Description

After installing my opneapi definitions:

npx api install @hytopia-api-internal/v1.0#1q9bc1r2lorj18va
# or
npx api@next install @hytopia-api-internal/v1.0#1q9bc1r2lorj18va

My TS definitions seem to be generated just fine, this request looks correct on my TS files:

const response = await api.upsertGameReview(
      {
        positive: true,
      },
      {
        gameId: "1234-1234-1234-1234",
        "X-Review-Provider-Key": "SECRET-KEY",
      },
    );

However looking at my API server the X-Review-Provider-Key is not being sent at all, also the X-Authorization header gets ignored as well even though the TS definitions allow it. Making the request through our documentation page in readme.io does work fine though.

Am I doing something wrong or is it a bug?

Edit: I get the same issue generating the SDK with the latest v7 beta branch.

Metadata

Assignees

No one assigned

    Labels

    area:coreIssues related to `core`, which is the package that powers the SDKs at runtimebugSomething isn't workinggood first issueGood for newcomershelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions