Skip to content

Commit

Permalink
always show HTTP request method in diagrams (#130)
Browse files Browse the repository at this point in the history
even if there are no query parameters
  • Loading branch information
ytausch authored Apr 4, 2023
1 parent aed522b commit c82e133
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions diagram.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ var templateFunc = &htmlTemplate.FuncMap{
}

func formatDiagramRequest(req *http.Request) string {
out := req.URL.Path
out := fmt.Sprintf("%s %s", req.Method, req.URL.Path)
if req.URL.RawQuery != "" {
out = fmt.Sprintf("%s %s?%s", req.Method, out, req.URL.RawQuery)
out = fmt.Sprintf("%s?%s", out, req.URL.RawQuery)
}
if len(out) > 65 {
return fmt.Sprintf("%s...", out[:65])
Expand Down

0 comments on commit c82e133

Please sign in to comment.