Skip to content
This repository has been archived by the owner on Jul 14, 2022. It is now read-only.

Include arbitrary headers with a request #43

Merged
merged 2 commits into from
Dec 8, 2021
Merged

Include arbitrary headers with a request #43

merged 2 commits into from
Dec 8, 2021

Conversation

gbmor
Copy link
Contributor

@gbmor gbmor commented Dec 5, 2021

This allows any arbitrary header to be set for a given request. As an example, many HTTP APIs, particularly commercial HTTP APIs, require opaque authentication tokens to be set in the headers, instead of the more familiar bearer tokens.

Added the following flag:

  • -H
  • --header

Must be in the text format key: value and can be specified multiple times to include multiple headers.

Example request:

$ hopp-cli get -H 'X-Api-Key: foobar' -H 'X-Api-Secret: super_secret' https://example.com/api/v1/accounts

Copy link
Contributor

@athul athul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks 👍👍

@athul
Copy link
Contributor

athul commented Dec 8, 2021

Hey @gbmor there seems to be a conflict from the main branch. If you could resolve it too would be great 😄

@gbmor
Copy link
Contributor Author

gbmor commented Dec 8, 2021

@athul resolved (it was the changes to README.md in this and my other PR you just merged)

@athul athul merged commit 40ae319 into hoppscotch:master Dec 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants