Search full request details
Summary: Simple implementation of searching through request/response body on "network" tab Reviewed By: passy Differential Revision: D18268026 fbshipit-source-id: 39386d2d6ec50b47c3ca3dec976821282b51636f
This commit is contained in:
committed by
Facebook Github Bot
parent
691a4ee135
commit
faaf8c4f32
@@ -283,8 +283,11 @@ ${request.headers
|
||||
)
|
||||
.join('\n')}`;
|
||||
|
||||
if (request.data) {
|
||||
copyText += `\n\n${decodeBody(request)}`;
|
||||
const requestData = request.data ? decodeBody(request) : null;
|
||||
const responseData = response && response.data ? decodeBody(response) : null;
|
||||
|
||||
if (requestData) {
|
||||
copyText += `\n\n${requestData}`;
|
||||
}
|
||||
|
||||
if (response) {
|
||||
@@ -300,8 +303,8 @@ ${response.headers
|
||||
.join('\n')}`;
|
||||
}
|
||||
|
||||
if (response) {
|
||||
copyText += `\n\n${decodeBody(response)}`;
|
||||
if (responseData) {
|
||||
copyText += `\n\n${responseData}`;
|
||||
}
|
||||
|
||||
return {
|
||||
@@ -346,6 +349,8 @@ ${response.headers
|
||||
sortKey: request.timestamp,
|
||||
copyText,
|
||||
highlightOnHover: true,
|
||||
requestBody: requestData,
|
||||
responseBody: responseData,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -471,6 +476,7 @@ class NetworkTable extends PureComponent<NetworkTableProps, NetworkTableState> {
|
||||
highlightedRows={this.props.highlightedRows}
|
||||
rowLineHeight={26}
|
||||
allowRegexSearch={true}
|
||||
allowBodySearch={true}
|
||||
zebra={false}
|
||||
actions={<Button onClick={this.props.clear}>Clear Table</Button>}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user