Skip to content
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

Dynamic Headers #91

Closed
pawel-dubiel opened this issue Aug 29, 2019 · 19 comments
Closed

Dynamic Headers #91

pawel-dubiel opened this issue Aug 29, 2019 · 19 comments
Labels
feature New feature or request good first issue Good for newcomers

Comments

@pawel-dubiel
Copy link

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.

@liyasthomas liyasthomas added the feature New feature or request label Aug 29, 2019
@aeeed99
Copy link
Contributor

aeeed99 commented 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.

@saphal1998
Copy link

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

@aeeed99
Copy link
Contributor

aeeed99 commented Oct 6, 2019

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

@saphal1998 saphal1998 removed their assignment Oct 9, 2019
@sblasa
Copy link

sblasa commented 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!

@liyasthomas
Copy link
Member

liyasthomas commented Oct 20, 2019

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

@sblasa
Copy link

sblasa commented 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.

@liyasthomas
Copy link
Member

Great! Please collaborate and discuss! 🎉

@sblasa
Copy link

sblasa commented Oct 20, 2019

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

@aeeed99
Copy link
Contributor

aeeed99 commented Oct 20, 2019

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

@aeeed99
Copy link
Contributor

aeeed99 commented 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!

@liyasthomas
Copy link
Member

liyasthomas commented Oct 21, 2019

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

@aeeed99
Copy link
Contributor

aeeed99 commented 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.

@liyasthomas
Copy link
Member

liyasthomas commented 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.

@NBTX
Copy link
Contributor

NBTX commented Oct 25, 2019

This could also be merged with #139 potentially #196 and this use case of #147 was specifically mentioned here: #147 (comment)

@liyasthomas
Copy link
Member

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

@NBTX
Copy link
Contributor

NBTX commented 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).

@liyasthomas
Copy link
Member

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

@aeeed99
Copy link
Contributor

aeeed99 commented 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

@liyasthomas
Copy link
Member

Closing due to inactivity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

6 participants