Skip to content

Commit

Permalink
feat: Copy the request data in the network details
Browse files Browse the repository at this point in the history
  • Loading branch information
于京刚 authored and surunzi committed May 14, 2023
1 parent bbb38ba commit 05da249
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Network/Detail.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ export default class Detail extends Emitter {
const detailData = this._detailData

let data = `${detailData.method} ${detailData.url} ${detailData.status}\n`
if(!isEmpty(detailData.data)) {
data += '\nRequest Data\n\n'
data += `${detailData.data}\n`
}
if (!isEmpty(detailData.reqHeaders)) {
data += '\nRequest Headers\n\n'
each(detailData.reqHeaders, (val, key) => (data += `${key}: ${val}\n`))
Expand Down

0 comments on commit 05da249

Please sign in to comment.