-
Notifications
You must be signed in to change notification settings - Fork 18
buildin_endpoints_post_html
Marcel Kloubert edited this page Feb 11, 2017
·
3 revisions
Home >> Build-in endpoints >> [POST] /api/html
Opens a new HTML document (tab) in editor.
canOpen property must be set to (true)
for an user or guest in the settings to access the endpoint.
Request:
POST /api/html
{
"content": "<html>Hello, guys!</html>",
"title": "An opened HTML document from REST API!"
}
Instead of submitting an object that uses the NewHtmlDocument interface, you can simply submit a JSON parsed string object, like "<html>Hello, guys!</html>"
.
Possible response:
Content-type: application/json; charset=utf-8
Content-encoding: gzip
X-Vscode-Restapi: 1.4.0
Date: Sat, 11 Feb 2017 21:15:53 GMT
Connection: keep-alive
Transfer-Encoding: chunked
{
"code": 0
}
Code | Description |
---|---|
403 |
User has no right to open HTML documents. |