REST API、POST 富文本项目到 Domino 服务器
REST API, POST Rich Text Item to Domino server
我正在尝试使用我的 domino lotus notes 服务器 (9.0.1FP8)
的 REST-API
它适用于简单的文本字段,但如果我尝试将富文本项添加为 json,domino 服务器仅接收文本字段,而富文本字段为空。
我尝试用 Postman 和一个 Postrequest 到 http://localhost/Test/JSON_Vie…s/name/List?form=mainForm,
我在哪里发送 json
{
"title":"test rich text",
"artist":"rich texter",
"ntracks":1,
"attachments": {
"type": "multipart",
"content": [
{
"contentType": "multipart/alternative; Boundary=\"0__=4EBB0925DFBB40F18f9e8a93df938690918c4EBB0925DFBB40F1\"",
"contentDisposition": "inline"
},
{
"contentType": "text/plain; charset=US-ASCII",
"data": "test rich text",
"boundary": "--0__=4EBB0925DFBB40F18f9e8a93df938690918c4EBB0925DFBB40F1"
},
{
"contentType": "text/html; charset=US-ASCII",
"contentDisposition": "inline",
"data": "<html><body><font size=\"2\" face=\"sans-serif\"><b>test rich text</b></font></body></html>",
"boundary": "--0__=4EBB0925DFBB40F18f9e8a93df938690918c4EBB0925DFBB40F1"
}
]
}
}
掩码主窗体有文本字段 "title"、"artist"、"ntracks" 和富文本字段 "attachments".
如何发送图像 json 什么是 "boundary"?
你知道出了什么问题吗?
根据 documentation from IBM,您需要使用 PUT(而不是 POST)来更新字段。
经过一些试验,我现在知道出了什么问题。如果我在地址 http://localhost/Test/JSON_Views.nsf/api/data/documents?form=mainForm
上执行 POST,它将与附件一起使用。如果我使用 http://localhost/Test/JSON_Views.nsf/api/data/collections/name/List?form=mainForm&computewithform=true
附件字段将被忽略。但也许你能解释一下,额外的字段边界是什么,我是否可以通过我的附件名称设置 contentLocation?
我正在尝试使用我的 domino lotus notes 服务器 (9.0.1FP8)
的 REST-API它适用于简单的文本字段,但如果我尝试将富文本项添加为 json,domino 服务器仅接收文本字段,而富文本字段为空。
我尝试用 Postman 和一个 Postrequest 到 http://localhost/Test/JSON_Vie…s/name/List?form=mainForm, 我在哪里发送 json
{
"title":"test rich text",
"artist":"rich texter",
"ntracks":1,
"attachments": {
"type": "multipart",
"content": [
{
"contentType": "multipart/alternative; Boundary=\"0__=4EBB0925DFBB40F18f9e8a93df938690918c4EBB0925DFBB40F1\"",
"contentDisposition": "inline"
},
{
"contentType": "text/plain; charset=US-ASCII",
"data": "test rich text",
"boundary": "--0__=4EBB0925DFBB40F18f9e8a93df938690918c4EBB0925DFBB40F1"
},
{
"contentType": "text/html; charset=US-ASCII",
"contentDisposition": "inline",
"data": "<html><body><font size=\"2\" face=\"sans-serif\"><b>test rich text</b></font></body></html>",
"boundary": "--0__=4EBB0925DFBB40F18f9e8a93df938690918c4EBB0925DFBB40F1"
}
]
}
}
掩码主窗体有文本字段 "title"、"artist"、"ntracks" 和富文本字段 "attachments".
如何发送图像 json 什么是 "boundary"?
你知道出了什么问题吗?
根据 documentation from IBM,您需要使用 PUT(而不是 POST)来更新字段。
经过一些试验,我现在知道出了什么问题。如果我在地址 http://localhost/Test/JSON_Views.nsf/api/data/documents?form=mainForm
上执行 POST,它将与附件一起使用。如果我使用 http://localhost/Test/JSON_Views.nsf/api/data/collections/name/List?form=mainForm&computewithform=true
附件字段将被忽略。但也许你能解释一下,额外的字段边界是什么,我是否可以通过我的附件名称设置 contentLocation?