-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding support for headers for api calls #90
Adding support for headers for api calls #90
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉Congratulations!!🎉 for making your first PR , our mentors will review it soon.
LGTM but codacy test is failing because you have a variable called as ex but never used - |
@GouravSardana Hey sorry I missed it, fixed the issue. |
Kudos, SonarCloud Quality Gate passed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Curious if this can be made a little more interactive and user-friendly. 🤔
@anshsrtv Don't you think filling data in the terminal is more painful, if there were multi line header ? |
I was thinking if we could have some kind of a Text-Area input from the command-line itself, it could also be useful if you want to incorporate POST where you essentially want to parse some Stringified JSON input. Need to check if there are any library available to do this. |
@utsabc Please research and create an issue for the same. Meanwhile, I'll merge this change |
Sure |
Description
Custom Headers are necessary ingredients for making an authorized request to some end-points, hence support for passing in custom headers can improve the applicability of the service.
In this PR I have added support for adding headers while making GET API calls using the client. The new feature prompts users to input custom headers in their API calls. The user can choose to skip it by pressing enter, otherwise, they can provide a valid Header dictionary which will be parsed and added as headers in the API Call. If any exception occurs while parsing currently printing info [Parse error occured] and continuing the API request.
Inputs:
Webhook Output:
Checklist:
Screenshots