summaryrefslogblamecommitdiff
path: root/redirect.go
blob: a39223443633f43c31dba6628238517f8cb893bc (plain) (tree)
1
2
3
4
5
6
7
8







                                                                 
package mux

import "net/http"

func Redirect(w http.ResponseWriter, code int, location string) {
	w.Header().Add("Location", location)
	w.WriteHeader(code)
}