Skip to content

Commit

Permalink
feat: add ctx.Body()
Browse files Browse the repository at this point in the history
  • Loading branch information
Duslia committed Jun 6, 2022
1 parent 753ef4f commit 9a98a43
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/app/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -972,6 +972,11 @@ func (ctx *RequestContext) GetRawData() []byte {
return ctx.Request.Body()
}

// Body returns body data
func (ctx *RequestContext) Body() ([]byte, error) {
return ctx.Request.BodyE()
}

type ClientIP func(ctx *RequestContext) string

var defaultClientIP = func(ctx *RequestContext) string {
Expand Down

0 comments on commit 9a98a43

Please sign in to comment.