gin-gonic / gin

Gin is a HTTP web framework written in Go (Golang). It features a Martini-like API with much better performance -- up to 40 times faster. If you need smashing performance, get yourself some Gin.
https://gin-gonic.com/
MIT License
79.27k stars 8.03k forks source link

Support COPY http method in RFC 4918 specs #3122

Open kengleong opened 2 years ago

kengleong commented 2 years ago

I am trying to define HTTP method COPY in my gin router as defined by RFC 4918 specification but gin router group does not support it. It only supports POST, PATCH, GET, DELETE, PUT, OPTIONS and HEAD

xmx commented 1 year ago
engine := gin.Default()

// COPY http://host:port/path
engine.Match([]string{"COPY"}, "/path", func(c *gin.Context) {
    c.String(http.StatusOK, "Hello")
})