Skip to content

Latest commit

 

History

History
22 lines (12 loc) · 367 Bytes

using-native-httphandler.md

File metadata and controls

22 lines (12 loc) · 367 Bytes

Using native http.Handler

Not recommended. Note that using native http handler you cannot access url params.

type nativehandler struct {}

func (_ nativehandler) ServeHTTP(res http.ResponseWriter, req *http.Request) {

}

func main() {
	iris.Handle("", "/path", iris.ToHandler(nativehandler{}))
	//"" means ANY(GET,POST,PUT,DELETE and so on)
}