Rest 没有使用POST指定URL
在shell中,我尝试使用Fedora Commons的REST API使用curl将二进制文件上载到特定位置:Rest 没有使用POST指定URL,rest,curl,fedora-commons,Rest,Curl,Fedora Commons,在shell中,我尝试使用Fedora Commons的REST API使用curl将二进制文件上载到特定位置: curl -X PUT --upload-file image.jpg -H "Content-Type: image/jpeg" -H "http://localhost:8080/rest/TestUpload/newexcel" 我得到的错误是: curl: no URL specified! 以下是此处的说明: -H用于在向服务器发送HTTP时请求中包含的额外头,您不应在
curl -X PUT --upload-file image.jpg -H "Content-Type: image/jpeg" -H "http://localhost:8080/rest/TestUpload/newexcel"
我得到的错误是:
curl: no URL specified!
以下是此处的说明:
-H
用于在向服务器发送HTTP时请求中包含的额外头,您不应在url之前使用它
您可能需要执行curl-xput--upload file image.jpg-H“Content Type:image/jpeg”http://localhost:8080/rest/TestUpload/newexcel