Standard library / net/http

http.StatusMethodNotAllowed

HTTP status 405. The method is not supported for this resource; Allow lists supported methods. Expected stdout: '405\n'.

Formal Syntax & Structure

go syntaxgo
const StatusMethodNotAllowed = 405

Working Example

Example Snippetgo
package main
import (  "fmt"  "net/http")
func main() { fmt.Println(http.StatusMethodNotAllowed) }
func must[T any](v T, e error) T {  if e != nil {    panic(e)  }  return v}func check(e error) {  if e != nil {    panic(e)  }}
Go Reference