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

Bruno doesn't insert the collection variable in to URL #3995

Closed
2 tasks done
emirozmen07 opened this issue Feb 11, 2025 · 4 comments
Closed
2 tasks done

Bruno doesn't insert the collection variable in to URL #3995

emirozmen07 opened this issue Feb 11, 2025 · 4 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@emirozmen07
Copy link

emirozmen07 commented Feb 11, 2025

I have checked the following:

  • I use the newest version of bruno.
  • I've searched existing issues and found nothing related to my issue.

Describe the bug

When I define a variable inside the collection settings and try to use it in the URL path it doesn't insert the defined variable in to the URL.

When I hover my mouse over the variable I can see that it defined but it still doesn't work.

Image

.bru file to reproduce the bug

No response

Screenshots/Live demo link

Image

Image

The code below
console.log("req",req.url)
Prints the text below
req {{baseUrl}}/api/welcome

@emirozmen07 emirozmen07 added the bug Something isn't working label Feb 11, 2025
@ganesh-bruno ganesh-bruno self-assigned this Feb 11, 2025
@ganesh-bruno ganesh-bruno added the good first issue Good for newcomers label Feb 11, 2025
@ganesh-bruno
Copy link
Collaborator

Hey @emirozmen07

Thanks for reporting this issue.

I was able to reproduce it. We're working on it.

@emirozmen07
Copy link
Author

emirozmen07 commented Feb 14, 2025

I would like to report that same problem exist for the folder variables.

@sreelakshmi-bruno
Copy link
Collaborator

sreelakshmi-bruno commented Feb 20, 2025

Hi @emirozmen07, I tried the setup and the request works for me. Please see the screen shots below.

Image Image

The var is interpolated during the execution and i'm getting the response as expected. If you're trying to console.log in the pre-request script, it would print out without the interpolation since it's before execution. Please let me know your thoughts.

@emirozmen07
Copy link
Author

emirozmen07 commented Feb 20, 2025

You are right, it only doesn't retrieve in the pre-request but otherwise works.

But I think it should be better if we can access to it in pre-request because it's a defined variable after all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants