NoContent
设置HTTP请求的响应状态码为204,响应体为空。
Example
// curl 'http://127.0.0.1:3000/' -v
package main
import (
"github.com/vicanso/elton"
"github.com/vicanso/elton/middleware"
)
func main() {
e := elton.New()
e.Use(middleware.NewDefaultResponder())
e.GET("/", func(c *elton.Context) (err error) {
c.NoContent()
return
})
err := e.ListenAndServe(":3000")
if err != nil {
panic(err)
}
}