Skip to content

HTTP code generation doesn't handle variables in URL correctly #315

@andrewhickman

Description

@andrewhickman

Describe the bug

The HTTP code generator, when given a URL starting with a variable like {{my_base_url}}/path, generates code like

GET /path HTTP/1.1
Host: https://example.com/base

Note the host header incorrectly includes both the scheme and part of the path, while the actual path is incomplete

Expanding the variable in manually causes the generator to give the correct output

GET /base/path HTTP/1.1
Host: example.com

To Reproduce
Steps to reproduce the behavior:

  • Set the my_base_url variable to https://example.com/base
  • Create a GET request with the url set to {{my_base_url}}/path
  • View the generated HTTP code

Screenshots

For example you could add the screenshot of the snippet/request builder from Postman app.
image

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions