-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(request-log): add view button to request log
- Loading branch information
1 parent
dee5a0a
commit a26504e
Showing
2 changed files
with
44 additions
and
2 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
web/components/templates/requestsV2/requestContentView.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import React from 'react'; | ||
import { NormalizedRequest } from './builder/abstractRequestBuilder'; | ||
|
||
interface RequestContentViewProps { | ||
request: NormalizedRequest; | ||
} | ||
|
||
const RequestContentView: React.FC<RequestContentViewProps> = ({ request }) => { | ||
return ( | ||
<div className="p-4"> | ||
<div className="mb-4"> | ||
<h3 className="text-lg font-semibold mb-2">Request</h3> | ||
<div style={{ overflowWrap: 'break-word' }}> | ||
<pre>{JSON.stringify(request.requestBody, null, 2)}</pre> | ||
</div> | ||
</div> | ||
<div> | ||
<h3 className="text-lg font-semibold mb-2">Response</h3> | ||
<div style={{ overflowWrap: 'break-word' }}> | ||
<pre>{JSON.stringify(request.responseBody, null, 2)}</pre> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default RequestContentView; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters