当我收到一封电子邮件的内容时,它的格式是换行符,但当我将它发送到 API 时,结果是没有空格的文本。
有什么办法可以保持间距?
编辑:
const postNewTask = (taskTitle, taskComment, workerId) => {
const { projectId, tasklistId } = dataStore();
const { userEmail, apiKey } = credentialsStore();
const options = {
method: 'POST',
headers: {
Authorization:
'Basic ' + Utilities.base64Encode(`${userEmail}:${apiKey}`),
},
};
if (taskComment && workerId) {
options.payload = JSON.stringify({
name: taskTitle,
comment: {
content: taskComment,
},
worker: parseInt(workerId),
});
}
烙印99
相关分类