add boolean for dumping HTTP bodies in hex format

This commit is contained in:
yungtravla 2019-08-01 17:42:47 +10:00 committed by GitHub
commit 3d6e28ea45
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -36,6 +36,7 @@ type EventsStream struct {
quit chan bool
dumpHttpReqs bool
dumpHttpResp bool
dumpFormatHex bool
}
func NewEventsStream(s *session.Session) *EventsStream {
@ -214,6 +215,10 @@ func NewEventsStream(s *session.Session) *EventsStream {
"false",
"If true all HTTP responses will be dumped."))
mod.AddParam(session.NewBoolParameter("events.stream.http.format.hex",
"true",
"If true dumped HTTP bodies will be in hexadecimal format."))
return mod
}
@ -258,6 +263,8 @@ func (mod *EventsStream) Configure() (err error) {
return err
} else if err, mod.dumpHttpResp = mod.BoolParam("events.stream.http.response.dump"); err != nil {
return err
} else if err, mod.dumpFormatHex = mod.BoolParam("events.stream.http.format.hex"); err != nil {
return err
}
return err