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

Shell - Httpie adds extra https:// for URLs that start with environment variables #330

Closed
CiaranMacCarthaigh opened this issue Sep 1, 2020 · 0 comments · Fixed by #389
Closed
Labels
bug Something isn't working

Comments

@CiaranMacCarthaigh
Copy link

Describe the bug
When using a URL that starts with an environment variable, and the environment variable starts with https://, the code generator for Shell - Httpie adds another https:// to the start of the URL.

Example:

Given a request URL {{GoogleUrl}}/doodles, where the enviroment variable for GoogleUrl is https://google.ie, the Shell - Httpie code generator creates http --follow --timeout 3600 GET https://https://google.ie/doodles.

Notes:

  1. This only occurs when using HTTPS. When the environment variable starts with "http://", e.g. http://google.ie, the code generator creates http --follow --timeout 3600 GET http://google.ie/doodles.

  2. For URLs that do not start with environment variables, e.g. https://google.ie/doodles, the code generator creates the correct URL.

To Reproduce
Steps to reproduce the behaviour:

  1. Create an environment in Postman with a variable named GoogleUrl. Set the current value to https://google.ie
  2. Create a GET request with the URL as {{GoogleUrl}}/doodles.
  3. Set the current environment to the one you created before and click on Send. Verify that the request returns 200 OK.
  4. Click on Code and then select "Shell - Httpie" from the list. Note that the code generator has added an extra https:// at the beginning of the URL.

Additional context
Reproducible in Postman v7.31.1. At time of writing, this was the latest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants