postmanerator
postmanerator copied to clipboard
Invalid URL when using postman environment
This is the error I am getting: Tried to parse an invalid URL: http://{{server_url}}/api/test/
Hey, this has something to do with this Go package that is used in the code. It seems to consider that http://{{server_url}}
is not a valid host.
One thing you could do until I figure out a way to tackle this elegantly, is to use the -collection
flag to change the {{server_url}}
variable part of the URL by an actual value.
For that you need to provide a Postman environment export which contain the parameter server_url
. You can export your Postman environment by clicking the "Manage environments" button in the Postman UI.
The content of the exported file should look like:
{
"id": "316cfffe-80bc-ff35-4a30-46d6085d1973",
"name": "Your environment",
"values": [
{
"key": "server_url",
"value": "my-awesome-server",
"type": "text",
"enabled": true
}
],
"timestamp": 1481360759312,
"_postman_variable_scope": "environment",
"_postman_exported_at": "2016-12-10T09:06:24.792Z",
"_postman_exported_using": "Postman/4.9.0"
}
Make sure you use the latest build of Postmanerator, here is how you can use it:
postmanerator -environment /path/to/your/env.json -collection /path/to/your/collection.json -output index.html