Standard library / net/http

http.StatusBadGateway

HTTP status 502. A gateway received an invalid upstream response. Expected stdout: '502\n'.

Formal Syntax & Structure

go syntaxgo
const StatusBadGateway = 502

Working Example

Example Snippetgo
package main
import (  "fmt"  "net/http")
func main() { fmt.Println(http.StatusBadGateway) }
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