2016-12-14 64 views
0

目前我運行的是uber.yaml,發現here。目前我得到實際的錯配與預期值:與預期與實際結果不匹配Dredd

expected: 
headers: 
Content-Type: application/json 

actual: 
statusCode: 301 
headers: 
server: nginx 
date: Tue, 13 Dec 2016 20:32:28 GMT 
content-type: text/html 
content-length: 178 
location: https://api.uber.com/v1/history 
connection: close 
age: 0 

任何人都知道如何解決這一問題?我已編輯的uber.yaml包括預期的內容類型如下:

- name: Content-Type 
    in: header 
    type: string 
    required: true 
    default: application/json 

回答

1

的問題是,API的狀態代碼:301和內容類型text/html響應,但你的API描述說,它應該通過Content Type application/json進行響應。

相關問題