Skip to content

Commit

Permalink
#39 #37 Display query strings and form/multipart data separately
Browse files Browse the repository at this point in the history
  • Loading branch information
fredsted committed Sep 19, 2018
1 parent 3243763 commit d094eb9
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 4 deletions.
2 changes: 2 additions & 0 deletions app/Storage/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ public static function createFromRequest(HttpRequest $request)
'method' => $request->getMethod(),
'user_agent' => $request->header('User-Agent'),
'content' => file_get_contents('php://input'),
'query' => empty($request->query->all()) ? null : $request->query->all(),
'request' => empty($request->request->all()) ? null : $request->request->all(),
'headers' => $request->headers->all(),
'url' => $request->fullUrl(),
'created_at' => Carbon::now()->toDateTimeString(),
Expand Down
9 changes: 7 additions & 2 deletions public/css/app.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion public/css/app.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion resources/assets/sass/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ code {
* Request Details Table
*/

#requestDetails {
#requestDetails, #requestData {
.table > tbody > tr > td,
.table > tbody > tr > th,
.table > tfoot > tr > td,
Expand Down
32 changes: 32 additions & 0 deletions resources/views/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,38 @@ class="btn btn-xs" ng-class="redirectUrl ? '' : 'disabled'"
</table>
</div>
</div>
<div class="row" id="requestData" ng-show="!hideDetails">
<div class="col-md-6" ng-hide="!currentRequest.query">
<table class="table table-borderless table-striped">
<tbody>
<tr>
<th colspan="2">
Query strings
</th>
</tr>
<tr ng-repeat="(name, value) in currentRequest.query">
<td width="25%">{{ name }}</td>
<td><code>{{ value == '' ? '(empty)' : value }}</code></td>
</tr>
</tbody>
</table>
</div>
<div class="col-md-6" ng-show="currentRequest.request && currentRequest.request != currentRequest.query">
<table class="table table-borderless table-striped">
<tbody>
<tr>
<th colspan="2">
Form values
</th>
</tr>
<tr ng-repeat="(name, value) in currentRequest.request">
<td width="25%">{{ name }}</td>
<td><code>{{ value == '' ? '(empty)' : value }}</code></td>
</tr>
</tbody>
</table>
</div>
</div>

<div class="row">
<div class="col-md-12">
Expand Down

0 comments on commit d094eb9

Please sign in to comment.