/* RFC 2616/7230/7231 */ package icspacketparser import ( "fmt" "net/http" "gitlab.com/cinnamon/voiceagent/icserror" ) type HTTP struct { Method int ContentType int ContentLength int Payload string Msg string } func NewHTTP() HTTP { http := HTTP{} return http } func (h *HTTP) HTTPParser(req *http.Request) (err *icserror.IcsError) { fmt.Println("HTTPParser") return nil } func (h *HTTP) GetPacketData(packet interface{}) (err *icserror.IcsError) { fmt.Println("HTTP.GetPacketData") switch v := packet.(type) { case *http.Request: if err = h.HTTPParser(v); err != nil { return err } } return nil }