0
後,我有一個REST API與後續的端點:嫋嫋不按位置後
curl -L -H "Content-Type: application/json" -X POST -d "{\"source\" : \"3\", \"destination\" : \"5\"}" "http://localhost:8080/api/edge" |cjson
這一要求不使後門柱位置URL(返回null,在這種情況下,我使用格式輸出的cjson
)。如果在帖子後使用類似postman
的工具,則正確的重定向完成。
這裏使用-i
選項:提前
curl -i -H "Content-Type: application/json" -X POST -d "{\"source\" : \"3\", \"destination\" : \"5\"}" "http://localhost:8080/api/edge"
HTTP/1.1 303 See Other
Date: Sun, 27 Sep 2015 01:39:40 GMT
Location: http://localhost:8080/api/customer
Vary: Accept
Content-Type: application/json;charset=ISO-8859-1
Content-Length: 0
Server: Jetty(7.6.8.v20121106)
感謝