diff --git a/CHANGELOG.md b/CHANGELOG.md index af9b5d8..4fe9789 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## [Unreleased] +## v1.1.0 +### Added +- add query string in the request log + ## v1.0.0 ### Added - remove "retry" button and add a button for each request in the list diff --git a/capture.go b/capture.go index f5f11e8..3591fac 100644 --- a/capture.go +++ b/capture.go @@ -27,12 +27,13 @@ type Capture struct { } type Req struct { - Proto string - Method string - Url string - Path string - Header http.Header - Body []byte + Proto string `json:"proto"` + Method string `json:"method"` + Url string `json:"url"` + Path string `json:"path"` + Query string `json:"query"` + Header http.Header `json:"header"` + Body []byte `json:"body"` } type Res struct { @@ -54,6 +55,7 @@ type CaptureInfo struct { type DashboardItem struct { ID int `json:"id"` Path string `json:"path"` + Query string `json:"query"` Method string `json:"method"` Status int `json:"status"` @@ -115,6 +117,7 @@ func (s *CaptureService) DashboardItems() []DashboardItem { metadatas[i] = DashboardItem{ ID: capture.ID, Path: capture.Req.Path, + Query: capture.Req.Query, Method: capture.Req.Method, Status: capture.Res.Code, Elapsed: capture.Elapsed, diff --git a/dashboard.html b/dashboard.html index e766bb7..9ed3ee1 100644 --- a/dashboard.html +++ b/dashboard.html @@ -185,6 +185,14 @@ color: var(--disabled); } + .query { + padding: 1rem; + font-family: inherit; + font-weight: 400; + line-height: 1.2em; + color: #fff; + } + pre { word-break: break-all; white-space: pre-wrap; @@ -330,11 +338,11 @@
{{selectedItem.request}}+
{{ selectedItem.request }}
{{selectedItem.response}}+
{{ selectedItem.response }}
Waiting for requests on http://localhost:{{proxyPort}}/
- Proxying {{targetURL}}
+ Proxying {{ targetURL }}