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
Add ability to trigger another request in collection from pre-request script #697
Comments
+1 - this alone would probably get my team to upgrade to using pre-request scripts. Very common for us with one of our token generation schemes. OK if only in the packaged app and not Chrome. |
@prathiraj @tmcdonnell87 - trying to understand the use-case here - In the pre-request script for request r1, you check if a condition is true. If true, you fire request r2, set environment variables from the response of r2, and use those variables in r1. Is that correct? |
Two cases: 1 - Exactly what you said, though to elaborate, it may be a data-based condition. Only some values would require the pre-request. Thanks! |
+1 to what @tmcdonnell87 said. |
+1 also For now it oblige to make specific collections, just to feed environments variables by calling special API calls, to compute this kind of 'auth / security / crypto' needs for token, nonce.... |
+1 this would be immensely useful. |
+1 |
3 similar comments
+1 |
+1 |
+1 |
+1 It will change the way we test our API |
+1 |
2 similar comments
+1 |
+1 |
+1, thanks. |
+1, definitely need this feature |
You can use test script to populate enviroments after request |
Yes... but that's a very clunky process , especially if you have multiple requests in the chain or conditional logic. |
I agree, especially if you look at the original request, that outline that This feature is the logical next step, for progressively build a complete Take for example a complex, crypto setup where during a login phase, some On Wed, Sep 23, 2015 at 4:33 PM, Terry notifications@github.com wrote:
|
+1 |
+2 |
+1 |
+1 |
+1 |
1 similar comment
+1 |
@joaovpmamede @sh3raawii and anyone else like myself who wanted this issue to allow sending of collection requests, please go over to this issue and give it a 👍 GO HERE: #4193 |
+1 |
4 similar comments
+1 |
+1 |
+1 |
+1 |
@shamasis @abhijitkane @czardoz Do you mind locking this thread so it doesn't continue to get +1s? |
+1 |
➕💯 |
|
+2 |
+1 |
+2 |
+1 |
1 similar comment
+1 |
It is may be a very late reply, but I just found something very simple, which might be helpful. And then same variable can be used into other request pre-requsite script. |
This works, but the captured request is captured with all of it's variables resolved (unsurprisingly). So, if you switch environments, you'll need to re-run the authorization request to re-generate the captured request with the correct parameters. It's definitely a start, though! |
Why is this issue marked as close? I see no resolution |
any updates? |
What I ended up using was the PreRequest scripts in a the collection itself, so that every single request inside that collection executes that script and gets the API token refresh, for example. |
The problem with that is you will have duplicate code in each pre request
script you need an Api token.
…On Mon, 17 Feb 2020 at 17:36, Fergardi ***@***.***> wrote:
What I ended up using was the PreRequest scripts in a the collection
itself, so that every single request inside that collection executes that
script and gets the API token refresh, for example.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#697?email_source=notifications&email_token=AGHYD72MYQI5JI74XG4KJJ3RDK4INA5CNFSM4ATI55E2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEL7A6YA#issuecomment-587075424>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGHYD74LUESDXLA554TSN23RDK4INANCNFSM4ATI55EQ>
.
|
+1 |
1 similar comment
+1 |
Still don't see a resolution in this thread that was opened 6 years ago...instead I see multiple issues revolving around the same feature request, and comments like "Do you mind locking this thread so it doesn't continue to get +1s". So instead of addressing the issue (I continue to see activity on this issue, #4193 and #4845), you'd rather lock it so no further comments can come out of it. Either close all the issues as "wont-fix" or actually consolidate them all into one issue (as requested last year in #882). Or maybe we can discuss the issue. You know, like what GitHub issues are for. |
+1 |
+1000000 |
Hey 👋 I've gathered all feedback from here and other issues into a single one, please add a 👍 reaction to the first post there if you'd also want that feature. |
[Feature request]
Add ability to trigger another request in collection from pre-request script
The text was updated successfully, but these errors were encountered: