HTTP client - hierarchical properties in http-client.env.json
已回答
I'm trying out the new HTTP client. I need to use environments, however, the documentation seems to be a little incomplete. I'm create http-client.env.json with this properties:
{
"development": {
"host": "localhost",
"port": 8080,
"deploy": "deploy_path",
"auth": [
{"user": {"login": "user@login", "password": "password"}},
{"admin": {"login": "admin@login", "password": "admin"}}
]
}
}
and I'm starting a HTTP request with this environment:
POST http://{{host}}:{{port}}/{{deploy}}/rest/some_path
Authorization: Basic {{auth.user.login}} {{auth.user.password}}
Content-Type: application/json; charset=UTF-8
but it's don't work for - auth credentials doesn't load from http-client.env.json.
How i can use hierachical properties for HTTP client?
P.S. Sorry my google translate
请先登录再写评论。
Sorry for the probably naive and obvious question but does it work in a simpler way? Like this one:
and:
Vasiliy Yur
Yes, it works, as shown in the documentation. But I asked about the hierarchical properties. My example (with hierarchical properties):
involves authorization via user or admin or somewho in varioust tests:
Properties like a
are working, but it's less usable and clear.
Thanks for the extra explanation, got your point now.
Unfortunately, it does not work in this manner at the moment. Please feel free to submit a feature request:
https://youtrack.jetbrains.com/newIssue
Maybe you need to change json file?
Something like
```json