fix(network): recognize JSON #201
This commit is contained in:
@@ -4,6 +4,7 @@ import map from 'licia/map'
|
||||
import escape from 'licia/escape'
|
||||
import copy from 'licia/copy'
|
||||
import extend from 'licia/extend'
|
||||
import isJson from 'licia/isJson'
|
||||
import { classPrefix as c } from '../lib/util'
|
||||
import { curlStr } from './util'
|
||||
|
||||
@@ -63,14 +64,6 @@ export default class Detail {
|
||||
</div>
|
||||
<div class="${c('http')}">
|
||||
${postData}
|
||||
<div class="${c('section')}">
|
||||
<h2>Request Headers</h2>
|
||||
<table class="${c('headers')}">
|
||||
<tbody>
|
||||
${reqHeaders}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="${c('section')}">
|
||||
<h2>Response Headers</h2>
|
||||
<table class="${c('headers')}">
|
||||
@@ -79,6 +72,14 @@ export default class Detail {
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="${c('section')}">
|
||||
<h2>Request Headers</h2>
|
||||
<table class="${c('headers')}">
|
||||
<tbody>
|
||||
${reqHeaders}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
${resTxt}
|
||||
</div>`
|
||||
|
||||
@@ -129,6 +130,10 @@ export default class Detail {
|
||||
const data = this._detailData
|
||||
const resTxt = data.resTxt
|
||||
|
||||
if (isJson(resTxt)) {
|
||||
return showSources('object', resTxt)
|
||||
}
|
||||
|
||||
switch (data.subType) {
|
||||
case 'css':
|
||||
return showSources('css', resTxt)
|
||||
|
||||
Reference in New Issue
Block a user