Skip to content
This repository has been archived by the owner on Jul 14, 2022. It is now read-only.

Commit

Permalink
πŸ’¬πŸ€ Extended to response of Plain and HTML/XML
Browse files Browse the repository at this point in the history
Co-Authored-By: Ben Morrison <ben@gbmor.dev>
  • Loading branch information
athul and gbmor authored Feb 13, 2020
1 parent 09cf675 commit db9a07a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion methods/fns.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,12 @@ func formatresp(resp *http.Response) string {
c.Print(key, " : ")
magenta.Print(value, "\n")
}
s := c.Sprint(gohtml.Format(str))
var s string
if strings.Contains(heads, "plain") {
s = str
} else {
s = c.Sprint(gohtml.Format(str))
}
retbody = yellow.Sprintf("\nStatus:\t\t%s\n\nStatusCode:\t%d\n", resp.Status, resp.StatusCode) + fmt.Sprintf("\n%s\n", s)

}
Expand Down

0 comments on commit db9a07a

Please sign in to comment.