func (ctx *Context) Redirect(addr string, httpstatus ...int) {
	if len(httpstatus) == 0 || !(httpstatus[0] > 299 && httpstatus[0] < 400) {
		httpstatus = []int{http.StatusTemporaryRedirect}
	}
	ctx.statuscode = httpstatus[0]
	http.Redirect(ctx.w, ctx.r, addr, httpstatus[0])
}
Redirect Jump to antoher url
package webapi
import (
	"errors"
	"fmt"
	"io/ioutil"
	"net/http"
	"reflect"
	"strconv"
)
var (
	marshalableKinds = map[reflect.Kind]bool{
		reflect.Struct: true,
		reflect.Map:    true,
		reflect.Slice:  true,
		reflect.Array:  true,
	}
)
type (
	Middleware interface {
		Invoke(ctx *Context, next HTTPHandler)
	}
	HTTPHandler func(*Context)
	httpHandler func(*Context, ...string)
	Context struct {
		statuscode   int
		w            http.ResponseWriter
		r            *http.Request
		body         []byte
		predecessors []Middleware
		Deserializer Serializer
		Serializer   Serializer
		BeforeReading func([]byte) []byte
		BeforeWriting func(int, []byte) []byte
	}
)
func (ctx *Context) Reply(httpstatus int, obj ...interface{}) (err error) {
	var data []byte
	if len(obj) > 0 && obj[0] != nil {
		if _, isErr := obj[0].(error); isErr {
			data = []byte(obj[0].(error).Error())
		} else if entity := reflect.Indirect(reflect.ValueOf(obj[0])); entity.IsValid() {
			value := entity.Interface()
			_, isByte := value.([]byte)
			_, isRune := value.([]rune)
			if kind := entity.Kind(); !isByte && !isRune && marshalableKinds[kind] {
				if ctx.Serializer == nil {
					ctx.Serializer = Serializers["application/json"]
				}
				data, err = ctx.Serializer.Marshal(value)
			} else {
				switch value.(type) {
				case []byte:
					data = value.([]byte)
					break
				case []rune:
					data = []byte(string(value.([]rune)))
					break
				default:
					data = []byte(fmt.Sprintf("%v", value))
				}
			}
		}
		if err != nil {
			return
		}
	}
	return ctx.Write(httpstatus, data)
}
func (ctx *Context) Write(httpstatus int, data []byte) (err error) {
	if ctx.statuscode == 0 {
		ctx.statuscode = httpstatus
		if ctx.BeforeWriting != nil && len(data) > 0 {
			data = ctx.BeforeWriting(ctx.statuscode, data)
		}
		ctx.w.WriteHeader(httpstatus)
		if len(data) > 0 {
			_, err = ctx.w.Write(data)
		}
	} else {
		err = errors.New("the last written with " + strconv.Itoa(ctx.statuscode) + " has been submitted")
	}
	return
}