我有以下curl命令
curl -k -H "Content-Type :json" -H "Authorization :Bearer eH8AIKuLdQfhy6kG5I0fPBK/abNJUN89C" -XPUT https://localhost:9200/college/faculty/1 -d "
{
\"name\":\"rmg\",
\"post\":\"professor\"
}"
但是出现以下错误,我无法找出解决方案。
{"error":{"root_cause":[{"type":"content_type_header_exception","reason":"java.lang.IllegalArgumentException: only one Content-Type header should be provided"}],"type":"content_type_header_exception","reason":"java.lang.IllegalArgumentException: only one Content-Type header should be provided","caused_by":{"type":"illegal_argument_exception","reason":"only one Content-Type header should be provided"}},"status":400}
答案 0 :(得分:0)
尝试curl -k -H 'Content-Type:application/json'