trilium/test-etapi/put-note-content.http

31 lines
627 B
Text
Raw Normal View History

2022-01-08 19:01:54 +08:00
POST {{triliumHost}}/etapi/create-note
2022-01-11 00:09:20 +08:00
Authorization: {{authToken}}
2022-01-08 19:01:54 +08:00
Content-Type: application/json
{
"parentNoteId": "root",
"title": "Hello",
"type": "code",
"mime": "text/plain",
"content": "Hi there!"
}
> {% client.global.set("createdNoteId", response.body.note.noteId); %}
###
PUT {{triliumHost}}/etapi/notes/{{createdNoteId}}/content
2022-01-11 00:09:20 +08:00
Authorization: {{authToken}}
2022-01-08 19:01:54 +08:00
Content-Type: text/plain
Changed content
> {% client.assert(response.status === 204); %}
2022-01-08 19:01:54 +08:00
###
GET {{triliumHost}}/etapi/notes/{{createdNoteId}}/content
2022-01-11 00:09:20 +08:00
Authorization: {{authToken}}
2022-01-08 19:01:54 +08:00
> {% client.assert(response.body === "Changed content"); %}