在这个命令之后得到 无法解析 host: application错误:
curl -i -H 'Content-Type: application/json' -d '{"Code":"FR","Name":"France"}' http://127.0.0.1:8080/countries
完整的错误日志:
curl: (6) Could not resolve host: application
HTTP/1.1 415 Unsupported Media Type
Content-Type: application/json; charset=utf-8
X-Powered-By: go-json-rest
Date: Sat, 02 Apr 2016 05:31:20 GMT
Content-Length: 73
{
"Error": "Bad Content-Type or charset, expected 'application/json'"
}
这个命令有什么问题吗?
编辑:
我解决了我的问题编辑像这样在窗口: "{/"Code/":/"FR/"}"