GithubHelp home page GithubHelp logo

Comments (13)

frille700 avatar frille700 commented on June 15, 2024 4

I have seen seen similar problem, when trying to set the env variable that is used in the body, with a pre-request script. It appears that the pre request script is NOT preceeding the body construction. The pre request script should preceed everything in the request, even the construction of the request itself, including body and headers etc. Otherwise the full potential of the pre request script is not there

from bruno.

marfranke avatar marfranke commented on June 15, 2024 1

@frille700 I get your point. But executing the pre-request script directly before the execution of the request has the advantage, that you can work with the fully prepared request.
So maybe splitting the pre-request script in two (pre-prepare-request and pre-request) is better to get the best of both worlds.

from bruno.

frille700 avatar frille700 commented on June 15, 2024 1

Yes I have realized the advantages with the pre request too. I got it to work by using the req.setBody in the pre request script and that way was able to set what I wanted. But, as you point out, it would be neat with a pre-prepare-request kind of thing

from bruno.

VeselovAndrey avatar VeselovAndrey commented on June 15, 2024 1

Similar issue with variables in the URL segment.
E.g. {{serverRoot}/content/{{id}}
After {{id}} change next request will use old {{id}} value and only 2nd attempt will use new value.

from bruno.

lewg avatar lewg commented on June 15, 2024 1

Similar issue with variables in the URL segment. E.g. {{serverRoot}/content/{{id}} After {{id}} change next request will use old {{id}} value and only 2nd attempt will use new value.

This, in particular, has broken all my collections. Is the intention to remove that capability entirely? If not, how would you set those before the request now?

from bruno.

VeselovAndrey avatar VeselovAndrey commented on June 15, 2024 1

@lohxt1 Did a quick test with 1 request and 2 different values in a URL segment - see no issues.

from bruno.

luisdosreis avatar luisdosreis commented on June 15, 2024 1

Can confirm that it seems fixed in v1.18.0.

from bruno.

marfranke avatar marfranke commented on June 15, 2024

And it relates to #2249. However, this issue describes the opposite...

from bruno.

applepies avatar applepies commented on June 15, 2024

I got it to work by using the req.setBody in the pre request script and that way was able to set what I wanted.

thanks @frille700 - this is a workaround I can work with

from bruno.

fburato avatar fburato commented on June 15, 2024

@VeselovAndrey: I'm getting the same issue. Downgrading to version v1.14.0 appears to fix it.

from bruno.

luisdosreis avatar luisdosreis commented on June 15, 2024

Similar issue with variables in the URL segment. E.g. {{serverRoot}/content/{{id}} After {{id}} change next request will use old {{id}} value and only 2nd attempt will use new value.

This, in particular, has broken all my collections. Is the intention to remove that capability entirely? If not, how would you set those before the request now?

This can be dangerous if you are doing operations in a production environment.
Needs to be fixed or users warned.

from bruno.

lohxt1 avatar lohxt1 commented on June 15, 2024

@applepies @frille700 @VeselovAndrey @lewg @fburato @marfranke @luisdosreis

This issue has been fixed in v1.18.0.

Could you please verify and let me know if you're still facing any issues?

from bruno.

lohxt1 avatar lohxt1 commented on June 15, 2024

closing

please re-open if you are still facing the issue

from bruno.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.