github.com/shogo82148/std@v1.22.1-0.20240327122250-4e474527810c/net/http/status.go (about)

     1  // Copyright 2009 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package http
     6  
     7  // IANAに登録されたHTTPステータスコード。
     8  // 詳細はこちらを参照してください:https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
     9  const (
    10  	StatusContinue           = 100
    11  	StatusSwitchingProtocols = 101
    12  	StatusProcessing         = 102
    13  	StatusEarlyHints         = 103
    14  
    15  	StatusOK                   = 200
    16  	StatusCreated              = 201
    17  	StatusAccepted             = 202
    18  	StatusNonAuthoritativeInfo = 203
    19  	StatusNoContent            = 204
    20  	StatusResetContent         = 205
    21  	StatusPartialContent       = 206
    22  	StatusMultiStatus          = 207
    23  	StatusAlreadyReported      = 208
    24  	StatusIMUsed               = 226
    25  
    26  	StatusMultipleChoices   = 300
    27  	StatusMovedPermanently  = 301
    28  	StatusFound             = 302
    29  	StatusSeeOther          = 303
    30  	StatusNotModified       = 304
    31  	StatusUseProxy          = 305
    32  	_                       = 306
    33  	StatusTemporaryRedirect = 307
    34  	StatusPermanentRedirect = 308
    35  
    36  	StatusBadRequest                   = 400
    37  	StatusUnauthorized                 = 401
    38  	StatusPaymentRequired              = 402
    39  	StatusForbidden                    = 403
    40  	StatusNotFound                     = 404
    41  	StatusMethodNotAllowed             = 405
    42  	StatusNotAcceptable                = 406
    43  	StatusProxyAuthRequired            = 407
    44  	StatusRequestTimeout               = 408
    45  	StatusConflict                     = 409
    46  	StatusGone                         = 410
    47  	StatusLengthRequired               = 411
    48  	StatusPreconditionFailed           = 412
    49  	StatusRequestEntityTooLarge        = 413
    50  	StatusRequestURITooLong            = 414
    51  	StatusUnsupportedMediaType         = 415
    52  	StatusRequestedRangeNotSatisfiable = 416
    53  	StatusExpectationFailed            = 417
    54  	StatusTeapot                       = 418
    55  	StatusMisdirectedRequest           = 421
    56  	StatusUnprocessableEntity          = 422
    57  	StatusLocked                       = 423
    58  	StatusFailedDependency             = 424
    59  	StatusTooEarly                     = 425
    60  	StatusUpgradeRequired              = 426
    61  	StatusPreconditionRequired         = 428
    62  	StatusTooManyRequests              = 429
    63  	StatusRequestHeaderFieldsTooLarge  = 431
    64  	StatusUnavailableForLegalReasons   = 451
    65  
    66  	StatusInternalServerError           = 500
    67  	StatusNotImplemented                = 501
    68  	StatusBadGateway                    = 502
    69  	StatusServiceUnavailable            = 503
    70  	StatusGatewayTimeout                = 504
    71  	StatusHTTPVersionNotSupported       = 505
    72  	StatusVariantAlsoNegotiates         = 506
    73  	StatusInsufficientStorage           = 507
    74  	StatusLoopDetected                  = 508
    75  	StatusNotExtended                   = 510
    76  	StatusNetworkAuthenticationRequired = 511
    77  )
    78  
    79  // StatusText は、HTTP ステータスコードのテキストを返します。
    80  // コードが不明な場合は、空の文字列を返します。
    81  func StatusText(code int) string