Open elazzabi opened 3 months ago
I can raise a PR @helloanoop if you are okay with that! (And after confirming the direction)
I would rather have a bru.interpolate(target: string): string
function, that can be generally used for all values inside the request.
Maybe even a req.interpolateAll()
that interpolates all values inside the request. But this will be more complicated.
I'd personally also like this to resolve path params as well (i.e. variables prefixed with :
)
I have checked the following:
Describe the feature you want to add
Currently, during the scripting phase, it is not possible to get interpolated values.
For example:
req.getUrl()
will return{{baseURL}}/users/{{userId}}
instead oflocalhost:3000/users/123
.I believe it's better to have these values interpolated by default. Or at least provide both options.
This https://github.com/usebruno/bruno/discussions/1469 is related
Mockups or Images of the feature
For two options:
Or by default: