Skip to content

Support specifying headers per-request #191

Open

Description

@kedarv

In Yelp/bravado, developers can specify per-request configuration by passing in _request_options to the service call. A potential usecase is specifying headers which are consumed by the downstream service (or services in the middle of the request path), such as Yelp/casper.

The python api looks like:

client = SwaggerClient.from_url(...)
request_options = { ... }
client.pet.getPetById(petId=42, _request_options=request_options).response().result

A potential solution is to expose a similarly named parameter in the JS equivalents.

Activity

  1. changed the title [-]Support per-request configuration[/-] [+]Support specifying headers per-request[/+] on Jan 20, 2021
  2. magicmark commented on Jan 20, 2021

    @magicmark
    Contributor

    @kedarv can you sketch out what you expect the desired API to look like?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions