diff --git a/lib/components/ResponsesList/responses-list.html b/lib/components/ResponsesList/responses-list.html index bdc23817..b03a1322 100644 --- a/lib/components/ResponsesList/responses-list.html +++ b/lib/components/ResponsesList/responses-list.html @@ -1,6 +1,16 @@

Responses

+
+
+ Headers +
+
+
{{header.name}}
+
{{header.type}}
+
+
+
diff --git a/lib/components/ResponsesList/responses-list.js b/lib/components/ResponsesList/responses-list.js index 7b2ee009..2dc647e0 100644 --- a/lib/components/ResponsesList/responses-list.js +++ b/lib/components/ResponsesList/responses-list.js @@ -38,6 +38,14 @@ export default class ResponsesList extends BaseComponent { resp.code = respCode; resp.type = statusCodeType(resp.code); + if (resp.headers) { + resp.headers = Object.keys(resp.headers).map((k) => { + let respInfo = resp.headers[k]; + respInfo.name = k; + return respInfo; + }); + } + resp.extendable = resp.headers || resp.length; return resp; }); this.data.responses = responses; diff --git a/lib/components/ResponsesList/responses-list.scss b/lib/components/ResponsesList/responses-list.scss index ffd96479..0c33567a 100644 --- a/lib/components/ResponsesList/responses-list.scss +++ b/lib/components/ResponsesList/responses-list.scss @@ -4,3 +4,22 @@ margin: 0.5em 0; color: #253137; } + +.header-name { + font-weight: bold; + display: inline-block; +} + +.header-type { + display: inline-block; + font-weight: bold; + color: #999; +} + +.response-headers header { + font-size: 18px; +} + +.header { + margin-bottom: 10px; +}