mirror of
https://github.com/streetwriters/notesnook-sync-server.git
synced 2026-03-31 00:29:54 +02:00
inbox: add scripts for testing inbox api locally
This commit is contained in:
18
Notesnook.Inbox.API/scripts/test.ts
Normal file
18
Notesnook.Inbox.API/scripts/test.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
const response = await fetch("http://localhost:5181/inbox", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
Authorization: process.env.API_KEY,
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: JSON.stringify({
|
||||
title: "This is test note 4",
|
||||
type: "note",
|
||||
source: "script",
|
||||
version: 1,
|
||||
content: {
|
||||
type: "html",
|
||||
data: "<p>This is test note content 3</p>",
|
||||
},
|
||||
}),
|
||||
});
|
||||
console.log(await response.text());
|
||||
Reference in New Issue
Block a user