AnWeber / vscode-httpyac

Quickly and easily send REST, Soap, GraphQL, GRPC, MQTT and WebSocket requests directly within Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=anweber.vscode-httpyac
MIT License
222 stars 20 forks source link

Workspace not supported? #202

Closed sohaha closed 11 months ago

sohaha commented 1 year ago
TypeError: Cannot read properties of undefined (reading 'token') at Object.userJS (account/rbac.http:12:47) at Object.CQ [as runScript] (.vscode/extensions/anweber.vscode-httpyac-6.5.1/dist/extension.js:190:2187) at d_r.executeScriptData (.vscode/extensions/anweber.vscode-httpyac-6.5.1/dist/extension.js:187:44706) at d_r.processOnResponse (.vscode/extensions/anweber.vscode-httpyac-6.5.1/dist/extension.js:187:44620) at processTicksAndRejections (node:internal/process/task_queues:96:5) at ZZ.trigger (.vscode/extensions/anweber.vscode-httpyac-6.5.1/dist/extension.js:1:5158) at jvr (.vscode/extensions/anweber.vscode-httpyac-6.5.1/dist/extension.js:186:23237) at Object.action (.vscode/extensions/anweber.vscode-httpyac-6.5.1/dist/extension.js:186:21643) at ZZ.trigger
AnWeber commented 1 year ago

@sohaha What do you mean with support of workspaces? I use http files in Workspaces and it works fine. How is your setup?

sohaha commented 1 year ago

It seems that only the first folder in the workspace is supported.

for example:

dir1
  1.http // normal

dir2
  1.http // error
AnWeber commented 1 year ago

@sohaha your script needs a token, where is this token defined? Please make an example

sohaha commented 1 year ago

sorry forgot this,

http-client.private.env.json is dir2

{
  "dev": {
    "host": "http://127.0.0.1:8181",
    "token": "666"
  }
}
AnWeber commented 11 months ago

@sohaha can you please provide a complete example. Could not reproduce.

sohaha commented 11 months ago

There is no such problem at present, thank you for providing such a useful extension