我正在寻找一种方法来设置Contet-Typefor couchdb响应.
我有POST一个JSON使用Content-Type和Accept请求标题为application/json.但是当我调用GETfor该文档时,它会返回JSON响应Content-Type text/plain; charset=utf-8.我所期待的就是得到application/json它Content-Type.
我怎样才能做到这一点?
POST
{"_id":"test-hotel-stat-data","content":[{"hotelcode": "AMB3_LON","hotelname": "Ambassadors Bloomsbury"},{"hotelcode": "ALE1_LON","hotelname": "Alexandra"},{"hotelcode": "ALE1_LON","hotelname": "Alexandra"}]}得到
{"_id":"test-hotel-stat-data","_rev":"3-6c6e26cd5690794886a8dc65308bf078","content":[{"hotelcode":"AMB3_LON","hotelname":"Ambassadors Bloomsbury"},{"hotelcode":"ALE1_LON","hotelname":"Alexandra"},{"hotelcode":"ALE1_LON","hotelname":"Alexandra"}]}而不是这个,我尝试PUT然后GET但结果是相同的.
| 归档时间: |
|
| 查看次数: |
186 次 |
| 最近记录: |