R
R
Ruslan Absalyamov2020-10-02 11:25:36
phpstorm
Ruslan Absalyamov, 2020-10-02 11:25:36

Why does not see the variable in http?

I make this request in phpStorm

GET http://{{host}}/v3/institution/menu/categories?id=310
Content-Type: application/json
Authorization: Bearer {{token}}

###

Why does it write to me
GET http://{{host}}/v3/institution/menu/categories?id=310

Invalid URI because of unsubstituted variable 'host' at D:\domains\myata_sf\httpClient\auth.http:8:12
Possible solutions:
1. Add new environment file
2. Add variable to existing environment
3. Run with environment

Although http-client.env.json is written
{
  "dev": {
    "host": "value"
  }
}

And this file is located in the same directory where I try to send an http request via phpStorm
What could be the problem and when I click to run the script, I only write run {{host}}
Although in other projects using variables, it writes like run dev, run text and so on

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Max, 2020-10-02
@7workers

my file is called http-client.private.env.json

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question