mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 02:36:57 -07:00
misc: small fix or general refactoring i did not bother commenting
This commit is contained in:
parent
b98db78926
commit
9469c37ef0
2 changed files with 16 additions and 8 deletions
|
@ -26,6 +26,10 @@ type HTTPRequest struct {
|
|||
Body []byte `json:"body"`
|
||||
}
|
||||
|
||||
func (r HTTPRequest) IsType(ctype string) bool {
|
||||
return strings.Contains(r.ContentType, ctype)
|
||||
}
|
||||
|
||||
type HTTPResponse struct {
|
||||
Protocol string `json:"protocol"`
|
||||
Status string `json:"status"`
|
||||
|
@ -37,6 +41,10 @@ type HTTPResponse struct {
|
|||
TransferEncoding []string `json:"transfer_encoding"`
|
||||
}
|
||||
|
||||
func (r HTTPResponse) IsType(ctype string) bool {
|
||||
return strings.Contains(r.ContentType, ctype)
|
||||
}
|
||||
|
||||
func toSerializableRequest(req *http.Request) HTTPRequest {
|
||||
body := []byte(nil)
|
||||
ctype := "?"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue