-
Notifications
You must be signed in to change notification settings - Fork 18
buildin_endpoints_post_popups
Marcel Kloubert edited this page Feb 12, 2017
·
4 revisions
Home >> Build-in endpoints >> [POST] /api/popups
Shows a popup in the editor.
canExecute property must be set to (true)
for an user or guest in the settings to access the endpoint.
Request:
POST /api/popups
{
"message": "Select all in active editor?",
"items": [
{
"title": "Yes!",
"command": "editor.action.selectAll"
}
],
"type": "warning"
}
Instead of submitting a ShowMessageOptions object, you can simply use a JSON parsed string, like "Select all in active editor?"
, which represents the message.
Possible response:
Content-type: application/json; charset=utf-8
Content-encoding: gzip
X-Vscode-Restapi: 1.0.0
Date: Sat, 11 Feb 2017 00:44:20 GMT
Connection: keep-alive
Transfer-Encoding: chunked
{
"code": 0
}