如果我在终端中使用以下内容,则会收到回复
curl -XPOST 'https://api.wit.ai/converse?v=20170120&session_id=aqblurqqfb&q=Hi' \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H 'Authorization: Bearer U4FSEI23I742US2MONJML3UHL3DYC4XO'
但我正在使用httr包的GET()函数编写等效的R代码
require(httr)
GET(url="https://api.wit.ai/converse?v=20170120&session_id=aqblurqqfb&q=Hi",
add_headers("Content-Type"="application/json",Accept="application/json",
Authorization="Bearer U4FSEI23I742US2MONJML3UHL3DYC4XO"
)
)
但是当我在R中运行它时,上面得到了404响应。任何想法我在这里做错了什么?在此先感谢。