new: new http-req-dump caplet and js module.

This commit is contained in:
evilsocket 2018-01-10 18:13:16 +01:00
parent 29002eb0b8
commit 2eaee90182
3 changed files with 171 additions and 1 deletions

View file

@ -17,6 +17,7 @@ type JSRequest struct {
Method string
Version string
Path string
Query string
Hostname string
ContentType string
Headers []JSHeader
@ -42,8 +43,9 @@ func NewJSRequest(req *http.Request) JSRequest {
Client: strings.Split(req.RemoteAddr, ":")[0],
Method: req.Method,
Version: fmt.Sprintf("%d.%d", req.ProtoMajor, req.ProtoMinor),
Path: req.URL.Path,
Hostname: req.Host,
Path: req.URL.Path,
Query: req.URL.RawQuery,
ContentType: cType,
Headers: headers,