无法在 jira 中 post .json 文件
Unable to post .json file in jira
当添加到目录 link.
时,我无法 POST .json 文件
curl -s -D- -u uname:pword -X POST -d ${dir}@story_sp2.json -H "Content-Type: application/json" "https://jira.local.com/rest/api/2/issue/"
错误信息:
{"errorMessages":["Unexpected character ('/' (code 47)): maybe a (non-standard) comment? (not recognized as one since Feature 'ALLOW_COMMENTS' not enabled for parser)\n at [Source: org.apache.catalina.connector.CoyoteInputStream@1632e5dd; line: 1, column: 2]"]}
但是我可以 POST .json 没有目录的文件 link
curl -s -D- -u uname:pword -X POST -d @story_sp2.json -H "Content-Type: application/json" "https://jira.local.com/rest/api/2/issue/"
你的 -d 格式不正确。 '@' 应该在 '${dir}' 之前。此知识库文章中也提到了它 - https://confluence.atlassian.com/jirakb/unexpected-character-thrown-when-trying-to-perform-rest-calls-771895041.html.
希望对您有所帮助。
当添加到目录 link.
时,我无法 POST .json 文件curl -s -D- -u uname:pword -X POST -d ${dir}@story_sp2.json -H "Content-Type: application/json" "https://jira.local.com/rest/api/2/issue/"
错误信息:
{"errorMessages":["Unexpected character ('/' (code 47)): maybe a (non-standard) comment? (not recognized as one since Feature 'ALLOW_COMMENTS' not enabled for parser)\n at [Source: org.apache.catalina.connector.CoyoteInputStream@1632e5dd; line: 1, column: 2]"]}
但是我可以 POST .json 没有目录的文件 link
curl -s -D- -u uname:pword -X POST -d @story_sp2.json -H "Content-Type: application/json" "https://jira.local.com/rest/api/2/issue/"
你的 -d 格式不正确。 '@' 应该在 '${dir}' 之前。此知识库文章中也提到了它 - https://confluence.atlassian.com/jirakb/unexpected-character-thrown-when-trying-to-perform-rest-calls-771895041.html.
希望对您有所帮助。