[GH-ISSUE #91] Dynamic Headers #38

Closed
opened 2026-03-16 12:54:35 +03:00 by kerem · 19 comments
Owner

Originally created by @pawel-dubiel on GitHub (Aug 29, 2019).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/91

It would be great if we could create dynamic headers.

for example, some APIs may use a nonce and then based on the nonce we would need to create the hash and also update headers with that hash.

Originally created by @pawel-dubiel on GitHub (Aug 29, 2019). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/91 It would be great if we could create dynamic headers. for example, some APIs may use a nonce and then based on the nonce we would need to create the hash and also update headers with that hash.
kerem 2026-03-16 12:54:35 +03:00
Author
Owner

@nickpalenchar commented on GitHub (Oct 2, 2019):

I like this idea, but I think it can be broken into a few features.

First step is adding a way to interpolate variables into the request (which would actually make them dynamic)

While there could be a few built-in variables, it would make sense to have a "pre-request" script that sets additional variables.

The example OP gives implies chaining requests, with subsequent ones having access to bindings for data returned from the previous request. This would be really cool and convenient, but is a larger feature to build out for sure.

I'll start by looking into an option for pre-request script/adding variables in requests.

<!-- gh-comment-id:537288537 --> @nickpalenchar commented on GitHub (Oct 2, 2019): I like this idea, but I think it can be broken into a few features. First step is adding a way to interpolate variables into the request (which would actually make them dynamic) While there could be a few built-in variables, it would make sense to have a "pre-request" script that sets additional variables. The example OP gives implies chaining requests, with subsequent ones having access to bindings for data returned from the previous request. This would be really cool and convenient, but is a larger feature to build out for sure. I'll start by looking into an option for pre-request script/adding variables in requests.
Author
Owner

@saphal1998 commented on GitHub (Oct 5, 2019):

@nickpalenchar Really new to contributing. Can you rope me in while working on this issue? I'd really like to learn.

<!-- gh-comment-id:538634999 --> @saphal1998 commented on GitHub (Oct 5, 2019): @nickpalenchar Really new to contributing. Can you rope me in while working on this issue? I'd really like to learn.
Author
Owner

@nickpalenchar commented on GitHub (Oct 6, 2019):

Hi @saphal1998 I just emailed you, happy to work with you on this!

<!-- gh-comment-id:538784245 --> @nickpalenchar commented on GitHub (Oct 6, 2019): Hi @saphal1998 I just emailed you, happy to work with you on this!
Author
Owner

@sblasa commented on GitHub (Oct 20, 2019):

Hi @nickpalenchar and @saphal1998 ! Just wondering if I could assist with this issue? I wasn't sure if @saphal1998 was working on it based on the status. Thanks!

<!-- gh-comment-id:544292834 --> @sblasa commented on GitHub (Oct 20, 2019): Hi @nickpalenchar and @saphal1998 ! Just wondering if I could assist with this issue? I wasn't sure if @saphal1998 was working on it based on the status. Thanks!
Author
Owner

@liyasthomas commented on GitHub (Oct 20, 2019):

@sblasa you want to work on this feature? Shall I assign this to you.

<!-- gh-comment-id:544303356 --> @liyasthomas commented on GitHub (Oct 20, 2019): @sblasa you want to work on this feature? Shall I assign this to you.
Author
Owner

@sblasa commented on GitHub (Oct 20, 2019):

@liyasthomas , yes, I would like to work on this feature, but I'd like to work with @nickpalenchar 's implementation of the features he mentioned to help me get started.

<!-- gh-comment-id:544304004 --> @sblasa commented on GitHub (Oct 20, 2019): @liyasthomas , yes, I would like to work on this feature, but I'd like to work with @nickpalenchar 's implementation of the features he mentioned to help me get started.
Author
Owner

@liyasthomas commented on GitHub (Oct 20, 2019):

Great! Please collaborate and discuss! 🎉

<!-- gh-comment-id:544304191 --> @liyasthomas commented on GitHub (Oct 20, 2019): Great! Please collaborate and discuss! 🎉
Author
Owner

@sblasa commented on GitHub (Oct 20, 2019):

Thanks, @liyasthomas -- oh forgot to ask if you could also assign this to me.

<!-- gh-comment-id:544304366 --> @sblasa commented on GitHub (Oct 20, 2019): Thanks, @liyasthomas -- oh forgot to ask if you could also assign this to me.
Author
Owner

@nickpalenchar commented on GitHub (Oct 20, 2019):

Awesome @sblasa! I’ll be emailing you in a few hours 🙏

<!-- gh-comment-id:544305822 --> @nickpalenchar commented on GitHub (Oct 20, 2019): Awesome @sblasa! I’ll be emailing you in a few hours 🙏
Author
Owner

@nickpalenchar commented on GitHub (Oct 21, 2019):

oops, @sblasa, I see you don't have a public email; go ahead and send me one instead (email address on my github profile). Talk soon!

<!-- gh-comment-id:544323950 --> @nickpalenchar commented on GitHub (Oct 21, 2019): oops, @sblasa, I see you don't have a public email; go ahead and send me one instead (email address on my github profile). Talk soon!
Author
Owner

@liyasthomas commented on GitHub (Oct 21, 2019):

Environment variables feature branch is in WIP here: https://github.com/terranblake/postwoman/tree/terranblake/basic-environment

<!-- gh-comment-id:544324481 --> @liyasthomas commented on GitHub (Oct 21, 2019): Environment variables feature branch is in WIP here: https://github.com/terranblake/postwoman/tree/terranblake/basic-environment
Author
Owner

@nickpalenchar commented on GitHub (Oct 21, 2019):

uh oh.. this is also being worked on here: https://github.com/liyasthomas/postwoman/tree/feature/dynamic-headers

Not sure how to proceed.

<!-- gh-comment-id:544470246 --> @nickpalenchar commented on GitHub (Oct 21, 2019): uh oh.. this is also being worked on here: https://github.com/liyasthomas/postwoman/tree/feature/dynamic-headers Not sure how to proceed.
Author
Owner

@liyasthomas commented on GitHub (Oct 21, 2019):

You can go on as in your previous plans. Only one might be able to merge. Just shared another branch to see his implementation.

<!-- gh-comment-id:544472160 --> @liyasthomas commented on GitHub (Oct 21, 2019): You can go on as in your previous plans. Only one might be able to merge. Just shared another branch to see his implementation.
Author
Owner

@NBTX commented on GitHub (Oct 25, 2019):

This could also be merged with #139 potentially #196 and this use case of #147 was specifically mentioned here: https://github.com/liyasthomas/postwoman/issues/147#issuecomment-542351724

<!-- gh-comment-id:546336245 --> @NBTX commented on GitHub (Oct 25, 2019): This could also be merged with #139 potentially #196 and this use case of #147 was specifically mentioned here: https://github.com/liyasthomas/postwoman/issues/147#issuecomment-542351724
Author
Owner

@liyasthomas commented on GitHub (Oct 25, 2019):

#147 (introducing environment variables) will most probably solve all these. @terranblake is working on it, and will make PR within few days.

<!-- gh-comment-id:546337268 --> @liyasthomas commented on GitHub (Oct 25, 2019): #147 (introducing environment variables) will most probably solve all these. @terranblake is working on it, and will make PR within few days.
Author
Owner

@NBTX commented on GitHub (Oct 25, 2019):

Okay in that case, I'll open a new issue in place of #139 and #196 about some kind of scripting language and we can close this PR in favor of working on #147 collectively (it doesn't really make sense to have two sets of people working on the exact same feature).

<!-- gh-comment-id:546338116 --> @NBTX commented on GitHub (Oct 25, 2019): Okay in that case, I'll open a new issue in place of #139 and #196 about some kind of scripting language and we can close this PR in favor of working on #147 collectively (it doesn't really make sense to have two sets of people working on the exact same feature).
Author
Owner

@liyasthomas commented on GitHub (Oct 25, 2019):

Okay. Thats fine. Lets hear from @nickpalenchar about latest updates.

<!-- gh-comment-id:546339590 --> @liyasthomas commented on GitHub (Oct 25, 2019): Okay. Thats fine. Lets hear from @nickpalenchar about latest updates.
Author
Owner

@nickpalenchar commented on GitHub (Oct 25, 2019):

The work I've been doing with feature/dynamic-headers probably satisfies #139 more accurately, since its incorporating something similar to Postman's Pre-Request Scripts. This work could be moved to the new issue @NBTX plans to open in place of #139 and #196 , and I can continue there. It's been a very busy few weeks for me so my work's been slow to progress, but I'm hoping I'll be able to push this weekend and have it completed. When done, it can probably used in conjunction with #147

Additionally, @sblasa is looking at some syntax highlighting for pre-request scripts (potentially other places too); we might want to make that a separate issue for that as well

<!-- gh-comment-id:546343289 --> @nickpalenchar commented on GitHub (Oct 25, 2019): The work I've been doing with [feature/dynamic-headers](https://github.com/liyasthomas/postwoman/tree/feature/dynamic-headers) probably satisfies #139 more accurately, since its incorporating something similar to Postman's [Pre-Request Scripts](https://learning.getpostman.com/docs/postman/scripts/pre_request_scripts). This work could be moved to the new issue @NBTX plans to open in place of #139 and #196 , and I can continue there. It's been a very busy few weeks for me so my work's been slow to progress, but I'm hoping I'll be able to push this weekend and have it completed. When done, it can probably used in conjunction with #147 Additionally, @sblasa is looking at some syntax highlighting for pre-request scripts (potentially other places too); we might want to make that a separate issue for that as well
Author
Owner

@liyasthomas commented on GitHub (Apr 13, 2020):

Closing due to inactivity

<!-- gh-comment-id:612703488 --> @liyasthomas commented on GitHub (Apr 13, 2020): Closing due to inactivity
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#38
No description provided.