2016-12-14 65 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进行响应。

相关问题