func requestEx(c context.Context, data interface{}, cb func() error) error {
	if cb != nil {
		err := cb()
		if err != nil {
			c.ResponseError(err.Error(), http.StatusInternalServerError)
			return err
		}
		err = validator.Validate.Struct(data)
		if err != nil {
			c.ResponseError(err.Error(), http.StatusBadRequest)
			return err
		}
	}
	return nil
}
RequestEx get RequestBody
package web
import (
	"github.com/kataras/iris"
	"sync"
	ctx "github.com/kataras/iris/context"
	"github.com/kataras/iris/middleware/i18n"
	"hidevops.io/hiboot/pkg/app/web/context"
	"hidevops.io/hiboot/pkg/model"
	"hidevops.io/hiboot/pkg/utils/mapstruct"
	"hidevops.io/hiboot/pkg/utils/validator"
	"net/http"
)
type Context struct {
	iris.Context
}
func NewContext(app ctx.Application) context.Context {
	return &Context{
		Context: ctx.NewContext(app),
	}
}
var contextPool = sync.Pool{New: func() interface{} {
	return &Context{}
}}
func acquire(original iris.Context) *Context {
	c := contextPool.Get().(*Context)
	c.Context = original  
	return c
}
func release(c *Context) {
	contextPool.Put(c)
}
func Handler(h func(context.Context)) iris.Handler {
	return func(original iris.Context) {
		c := acquire(original)
		h(c)
		release(c)
	}
}
func (c *Context) Next() {
	ctx.Next(c)
}
func (c *Context) WrapHandler(h http.Handler)  {
	h.ServeHTTP(c.ResponseWriter(), c.Request())
}
func (c *Context) HTML(htmlContents string) (int, error) {
	c.Application().Logger().Infof("Executing .HTML function from Context")
	c.ContentType("text/html")
	return c.WriteString(htmlContents)
}
func (c *Context) translate(message string) string {
	message = i18n.Translate(c, message)
	return message
}
func (c *Context) Translate(format string, args ...interface{}) string {
	msg := c.Context.Translate(format, args...)
	if msg == "" {
		msg = format
	}
	return msg
}
func (c *Context) ResponseString(data string) {
	c.WriteString(c.translate(data))
}
func (c *Context) ResponseBody(message string, data interface{}) {
	response := new(model.BaseResponse)
	response.SetCode(c.GetStatusCode())
	response.SetMessage(c.translate(message))
	response.SetData(data)
	c.JSON(response)
}
func (c *Context) ResponseError(message string, code int) {
	response := new(model.BaseResponse)
	response.SetCode(code)
	response.SetMessage(c.translate(message))
	if c.ResponseWriter() != nil {
		c.StatusCode(code)
		c.JSON(response)
	}
}