我已完成规范,但我不确定何时使用content-location
vs location
。当我使用我的休息服务器进行HTTP GET时,我得到了以下响应
ResponseEntity
<200 OK,{
"store" : {
"book" : [ {
"category" : "reference",
"author" : "Nigel Rees",
"title" : "Sayings of the Century",
"displayprice" : 8.95
}, {
"category" : "fiction",
"author" : "Evelyn Waugh",
"title" : "Sword of Honour",
"displayprice" : 12.99
}, {
"category" : "fiction",
"author" : "Herman Melville",
"title" : "Moby Dick",
"isbn" : "0-553-21311-3",
"displayprice" : 8.99
}, {
"category" : "fiction",
"author" : "J. R. R. Tolkien",
"title" : "The Lord of the Rings",
"isbn" : "0-395-19395-8",
"displayprice" : 22.99
} ],
"bicycle" : {
"color" : "red",
"displayprice" : 19.95,
"foo:bar" : "fooBar",
"dot.notation" : "new",
"dash-notation" : "dashes"
}
}
},{Server=[Apache-Coyote/1.1], Content-Location=[http://localhost:25538/my-api/v1/edge/12345], Content-Type=[application/json], Transfer-Encoding=[chunked], Date=[Wed, 28 May 2014 05:19:43 GMT]}
我对content-Location
的使用是否正确以显示资源的确切网址。