Use*_*278 2 rest json curl watson-conversation watson
这是我的命令,我正在使用Mac OS,
curl -X POST \
-u "{username}":"{password}" —-header "Content-Type:application/json" --data "{\"input\": {\"text\": \"Turn on the lights\"}, \"context\": {\"conversation_id\": \"1b7b67c0-90ed-45dc-8508-9488bc483d5b\", \"system\": {"dialog_stack":[{"dialog_node":"root"}], \"dialog_turn_counter\": 1, \"dialog_request_counter\": 1}}}" "https://gateway.watsonplatform.net/conversation/api/v1/workspaces/25dfa8a0-0263-471b-8980-317e68c30488/message?version=2016-09-20"
Run Code Online (Sandbox Code Playgroud)
当我应用这个错误日志是,
curl: (6) Could not resolve host: —-header
curl: (6) Could not resolve host: Content-Type
{"error":"Unsupported Media Type"}
Run Code Online (Sandbox Code Playgroud)
请帮我解决这个问题.
提前致谢...