Vscode-restclient: "click the Send Request link above the request" doesn't work (anymore)

Created on 25 Oct 2017  路  10Comments  路  Source: Huachao/vscode-restclient

  • VSCode Version: 1.17.2
  • OS Version: Win10
  • REST Client Version: 0.15.3

Steps to Reproduce:

  1. Install the extension
  2. paste from docs into new document (or save as .rest/.http and activate HTTP mode, doesn't matter)

POST https://example.com/comments HTTP/1.1
content-type: application/json

{
"name": "sample",
"time": "Wed, 21 Oct 2015 18:27:50 GMT"
}

  1. a link to click above the HTTP POST line doesn't occur (even if line is of course not first but second/third), it seems the extension can't generate these clickable links anymore

it worked a few days ago, is the nice new VS code versionb with the orange logo breaking it?

as-designed question

Most helpful comment

nevermind: I had the "editor.codeLens" feature set to false in my work environment. I still dunno what it is at home, I'll check therte, but it would be good to add a hint that for the clickable links this (default-on, I know) feature has to be enabled.

All 10 comments

also, I'm not sure if it first worked at home or at work, in one of those I had a deinstall extension hickup with a VS code update running in between, so I supposed it was corrupted install. But after reinstalling VS code and extension it still remains, and the installer race was onbly on one of these systems

btw, the workspace is completely empty, i try to just a have a folder with a .rest file (and later on a .vscode folder with workspace settings file) as aa Postman collection replacement.

nevermind: I had the "editor.codeLens" feature set to false in my work environment. I still dunno what it is at home, I'll check therte, but it would be good to add a hint that for the clickable links this (default-on, I know) feature has to be enabled.

@HKochniss in my test, even I set this setting to false, the request can still be sent. Can you try the keyboard shortcut (ctrl+alt+r) to send the request to test if it works? Thanks in advance

Sure, shortcut always worked.

If you set the "editor.codeLens" in the respective workspace settings to false and restart VS Code, it wouldn't work.
But maybe there's another issue.

I don't know if that's intended, but you see the clikable button only on the _first_ request in a group that started with a ###

Meaning, subsequent request in that segment don't have the button, don't know if that's intended, but it's unexpected. That my be the reason, without some ### at the start of the file the first request doesn't have the clickable button.
But if that's meant as "a group of request that get executed by this button" it won't work, as the button still just executes the first request

image

Probably a seperate issue, just wanted to mention that.

Thanks for all the work, will show this awesome extension today as an alternative to Postman in a dev meeting of ours.. (and created a converter script)

To be clear:
this issue is about the clickable button only, the shortcut always worked. It's probably more the "CodeLense has to be activated" that was surprising to me, as I turned it off beforehand.

@HKochniss Use three consecutive # as a delimiter, we use ### to start a new request block
Like

GET https://localhost/api/users/1

###

GET https://localhost/api/users/

###

POST https://localhost/api/users/
Content-Type: application/json

{
   "name": "test"
}

I know. It's just that if you don't, then only the first request gets the button. But this button doesn't then execute alle the requests below, but just the first one. The current behavior seems inconsistent (there should be a button above every request, or if not, for a good reason, like executing all requests in a block).

Maybe I'm missing something

@HKochniss sorry, you didn't miss anything 馃槩 It's my current design that ### is a request block separator that lines inside it will be identified and parsed as a single request.

FWIW, @HKochniss found the fix for my situation, which was to enable codeLens. Without that enabled, I didn't get the Send Request button anywhere

Thanks, @Huachao for this awesome tool, and thanks @HKochniss for sharing the solution to that particular problem.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lldata picture lldata  路  13Comments

wboyle-erwin picture wboyle-erwin  路  43Comments

symbioticKid picture symbioticKid  路  28Comments

SimonDever picture SimonDever  路  15Comments

olivier-voutat picture olivier-voutat  路  23Comments