Skip to content

req.getPath() is empty if the address of the request starts with {{VAR}} #7248

@pavel-lobach

Description

@pavel-lobach

I have checked the following:

  • I have searched existing issues and found nothing related to my issue.

This bug is:

  • making Bruno unusable for me
  • slowing me down but I'm able to continue working
  • annoying
  • this feature was working in a previous version but is broken in the current release.

Bruno version

3.1.3

Operating System

Windows 11

Describe the bug

I need to get interpolated path of the request in pre-request script.

If the request looks like this:
https://something.com/path/:p1/:p2
Then req.getPath() properly returns '/path/p1value/p2value'.

But if I try to move the BASE URL to the parameter and the request looks like this:
{{BASEURL}}/path/:p1/:p2
Then req.getPath() returns empty value.

Expected behavior: it should return the interpolated path in both cases.

.bru file to reproduce the bug

No response

Screenshots/Live demo link

n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions