REST Client rest-client.env.json location

I'm trying out the new REST client. I need to use environments, however, the documentation seems to be a little incomplete. I'm starting with a single HTTP request and a single environment:

products.http:

GET https://{{host}}/{{apiRoot}}/{{baseSite}}/products/{{baseStore}}

rest-client.env.json:

{
"local": {
"host": "localhost:9002",
"apiRoot": "rest/v2",
"baseSite": "electronics",
"baseStore": "electronics"
}
}

When running, I can't choose any environment. Trying to run it anyway, I get:

java.lang.IllegalArgumentException: Illegal character in authority at index 8: https://{{host}}/{{apiRoot}}/{{baseSite}}/products/{{baseStore}}

The documentation is very unclear in this point. It says, rest-client.env.json must be in the project. Well, where in the project? In the root? In the same directory as the .http file? In a parent directory?

2 comments

Well, where in the project? In the root? In the same directory as the .http file? In a parent directory?

Anywhere but in an excluded folder.

Here's a screencast with IDEA 2018.2.4, it works OK: http://recordit.co/OrFXJsdzSK

Could you please record a similar one?

0

A, within a module was the point. I'm using Hybris and the Hybris Integration plugin which doesn't include the project root as a module. I put it just into a directory under the project root. As soon, as I create a module for it, it works fine.

0

Please sign in to leave a comment.