|
||||
File indexing completed on 2024-11-15 09:03:52
0001 // 0002 // Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com) 0003 // 0004 // Distributed under the Boost Software License, Version 1.0. (See accompanying 0005 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 0006 // 0007 // Official repository: https://github.com/boostorg/beast 0008 // 0009 0010 #ifndef BOOST_BEAST_HTTP_VERB_HPP 0011 #define BOOST_BEAST_HTTP_VERB_HPP 0012 0013 #include <boost/beast/core/detail/config.hpp> 0014 #include <boost/beast/core/string.hpp> 0015 #include <iosfwd> 0016 0017 namespace boost { 0018 namespace beast { 0019 namespace http { 0020 0021 /** HTTP request method verbs 0022 0023 Each verb corresponds to a particular method string 0024 used in HTTP request messages. 0025 */ 0026 enum class verb 0027 { 0028 /** An unknown method. 0029 0030 This value indicates that the request method string is not 0031 one of the recognized verbs. Callers interested in the method 0032 should use an interface which returns the original string. 0033 */ 0034 unknown = 0, 0035 0036 /// The DELETE method deletes the specified resource 0037 delete_, 0038 0039 /** The GET method requests a representation of the specified resource. 0040 0041 Requests using GET should only retrieve data and should have no other effect. 0042 */ 0043 get, 0044 0045 /** The HEAD method asks for a response identical to that of a GET request, but without the response body. 0046 0047 This is useful for retrieving meta-information written in response 0048 headers, without having to transport the entire content. 0049 */ 0050 head, 0051 0052 /** The POST method requests that the server accept the entity enclosed in the request as a new subordinate of the web resource identified by the URI. 0053 0054 The data POSTed might be, for example, an annotation for existing 0055 resources; a message for a bulletin board, newsgroup, mailing list, 0056 or comment thread; a block of data that is the result of submitting 0057 a web form to a data-handling process; or an item to add to a database 0058 */ 0059 post, 0060 0061 /** The PUT method requests that the enclosed entity be stored under the supplied URI. 0062 0063 If the URI refers to an already existing resource, it is modified; 0064 if the URI does not point to an existing resource, then the server 0065 can create the resource with that URI. 0066 */ 0067 put, 0068 0069 /** The CONNECT method converts the request connection to a transparent TCP/IP tunnel. 0070 0071 This is usually to facilitate SSL-encrypted communication (HTTPS) 0072 through an unencrypted HTTP proxy. 0073 */ 0074 connect, 0075 0076 /** The OPTIONS method returns the HTTP methods that the server supports for the specified URL. 0077 0078 This can be used to check the functionality of a web server by requesting 0079 '*' instead of a specific resource. 0080 */ 0081 options, 0082 0083 /** The TRACE method echoes the received request so that a client can see what (if any) changes or additions have been made by intermediate servers. 0084 */ 0085 trace, 0086 0087 // WebDAV 0088 0089 copy, 0090 lock, 0091 mkcol, 0092 move, 0093 propfind, 0094 proppatch, 0095 search, 0096 unlock, 0097 bind, 0098 rebind, 0099 unbind, 0100 acl, 0101 0102 // subversion 0103 0104 report, 0105 mkactivity, 0106 checkout, 0107 merge, 0108 0109 // upnp 0110 0111 msearch, 0112 notify, 0113 subscribe, 0114 unsubscribe, 0115 0116 // RFC-5789 0117 0118 patch, 0119 purge, 0120 0121 // CalDAV 0122 0123 mkcalendar, 0124 0125 // RFC-2068, section 19.6.1.2 0126 0127 link, 0128 unlink 0129 }; 0130 0131 /** Converts a string to the request method verb. 0132 0133 If the string does not match a known request method, 0134 @ref verb::unknown is returned. 0135 */ 0136 BOOST_BEAST_DECL 0137 verb 0138 string_to_verb(string_view s); 0139 0140 /// Returns the text representation of a request method verb. 0141 BOOST_BEAST_DECL 0142 string_view 0143 to_string(verb v); 0144 0145 /// Write the text for a request method verb to an output stream. 0146 inline 0147 std::ostream& 0148 operator<<(std::ostream& os, verb v) 0149 { 0150 return os << to_string(v); 0151 } 0152 0153 } // http 0154 } // beast 0155 } // boost 0156 0157 #ifdef BOOST_BEAST_HEADER_ONLY 0158 #include <boost/beast/http/impl/verb.ipp> 0159 #endif 0160 0161 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |