示例#1
0
func (h *humanstxt) Response(ctx skipper.FilterContext) {
	r := ctx.Response()
	r.StatusCode = 200
	r.Header.Set("Content-Type", "text/plain")
	r.Header.Set("Content-Length", strconv.Itoa(len(text)))
	r.Body.(io.Writer).Write([]byte(text))
}
示例#2
0
func (h *typ) Response(ctx skipper.FilterContext) {
	ctx.Response().StatusCode = 200
}
示例#3
0
文件: mock.go 项目: hafizh/skipper
func (f *Filter) Response(ctx skipper.FilterContext) {
	copyHeader(ctx.Response().Header, f.ResponseHeaders)
}
示例#4
0
// sets the configured header for the response
func (f *impl) Response(ctx skipper.FilterContext) {
	ctx.Response().Header.Add(f.Key(), f.Value())
}