Add custom headers option to CLI
See original GitHub issueWhen used as a library, OASGraph allows to define custom headers to be sent in every HTTP request to the wrapped REST(-like) API, as described in the [options]{https://github.com/strongloop/oasgraph/tree/master/packages/oasgraph#options}.
However, this feature is not available when using OASGraph via CLI. A new headers
option should allow users to define custom headers to send, for example, authentication tokens. This was also brought up in issue #88.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
How do I send Custom Headers with Curl? - ReqBin
You can pass multiple custom HTTP headers to Curl by repeating the -H "header: value" command line option. Click Run to execute the...
Read more >HTTP headers - HTTPie 3.2.1 (latest) docs
To set custom headers you can use the Header:Value notation. ... You can customize the output with the usual output options, with the...
Read more >How to add custom header in ZAP and zap-cli - HAHWUL
(Actually Burp and other use scanners tend to be somewhat similar.) So today I'm going to organize how you can use custom headers...
Read more >Custom headers - AWS Amplify Hosting
Custom HTTP headers enable you to specify headers for every HTTP response. Response headers can be used for debugging, security, and informational purposes....
Read more >Custom Headers with CLI Deployment Events
Simply add the --http-headers flag followed by the desired headers to your deployment CLI command. Sample use cases include: Setting tracking IDs on...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@Alan-Cha I think it’s common, yes. For example this is how cURL works and several command-line parser libs support this as well (e.g: yargs, commander, optimist etc ). Also, specifying the header’s value in this format is quite common.
By the way, you could add support for defining query string parameters the same way. Like --qs foo:1 --qs bar: 2
Viewers: ok thx. Unfortunately that’s not gonna work in my case. I need to send custom things like sessionToken, username etc. Anyway,I already solved this. I used OtG as a lib instead of CLI.
@gtamas Thank you so much for the insight! I will look into adding this feature then. Glad to hear that you were still able to solve your authentication problem!