1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef NET_HTTP_HTTP_STATUS_CODE_H_
6 #define NET_HTTP_HTTP_STATUS_CODE_H_
8 #include "net/base/net_export.h"
15 #define HTTP_STATUS(label, code, reason) HTTP_ ## label = code,
16 #include "net/http/http_status_code_list.h"
21 // Returns the corresponding HTTP status description to use in the Reason-Phrase
22 // field in an HTTP response for given |code|. It's based on the IANA HTTP
23 // Status Code Registry.
24 // http://www.iana.org/assignments/http-status-codes/http-status-codes.xml
26 // This function may not cover all codes defined in the IANA registry. It
27 // returns an empty string (or crash in debug build) for status codes which are
28 // not yet covered or just invalid. Please extend it when needed.
29 NET_EXPORT
const char* GetHttpReasonPhrase(HttpStatusCode code
);
33 #endif // NET_HTTP_HTTP_STATUS_CODE_H_