add server request body
This commit is contained in:
parent
baf7de76bf
commit
31fc8df2ba
@ -47,6 +47,11 @@ func (r *rpcRequest) Header() map[string]string {
|
|||||||
return r.header
|
return r.header
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (r *rpcRequest) Body() interface{} {
|
||||||
|
// TODO: convert to interface value
|
||||||
|
return r.body
|
||||||
|
}
|
||||||
|
|
||||||
func (r *rpcRequest) Read() ([]byte, error) {
|
func (r *rpcRequest) Read() ([]byte, error) {
|
||||||
// got a body
|
// got a body
|
||||||
if r.body != nil {
|
if r.body != nil {
|
||||||
|
@ -51,6 +51,8 @@ type Request interface {
|
|||||||
ContentType() string
|
ContentType() string
|
||||||
// Header of the request
|
// Header of the request
|
||||||
Header() map[string]string
|
Header() map[string]string
|
||||||
|
// Body is the initial decoded value
|
||||||
|
Body() interface{}
|
||||||
// Read the undecoded request body
|
// Read the undecoded request body
|
||||||
Read() ([]byte, error)
|
Read() ([]byte, error)
|
||||||
// The encoded message stream
|
// The encoded message stream
|
||||||
|
Loading…
Reference in New Issue
Block a user