Skip to content

Commit ad9e08e

Browse files
committed
add missing http verbs in http spec
1 parent a662534 commit ad9e08e

File tree

2 files changed

+39
-39
lines changed

2 files changed

+39
-39
lines changed

src/aws-cpp-sdk-core/include/aws/core/http/HttpTypes.h

Lines changed: 31 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -20,43 +20,37 @@ namespace Aws
2020
/**
2121
* Models Http methods.
2222
*/
23-
enum class HttpMethod
24-
{
25-
HTTP_GET,
26-
HTTP_POST,
27-
HTTP_DELETE,
28-
HTTP_PUT,
29-
HTTP_HEAD,
30-
HTTP_PATCH
31-
};
32-
33-
/**
34-
* Possible default http factory vended http client implementations.
35-
*/
36-
enum class TransferLibType
37-
{
38-
DEFAULT_CLIENT = 0,
39-
CURL_CLIENT,
40-
WIN_INET_CLIENT,
41-
WIN_HTTP_CLIENT
42-
};
43-
44-
/**
45-
* Configuration for a HTTP client, currently used only by libCurl
46-
*/
47-
enum class TransferLibPerformanceMode
48-
{
49-
LOW_LATENCY = 0, // run http client for a lower latency, at the expense of CPU
50-
REGULAR
51-
};
52-
53-
namespace HttpMethodMapper
54-
{
55-
/**
56-
* Gets the string value of an httpMethod.
57-
*/
58-
AWS_CORE_API const char* GetNameForHttpMethod(HttpMethod httpMethod);
59-
} // namespace HttpMethodMapper
23+
enum class HttpMethod {
24+
HTTP_GET,
25+
HTTP_POST,
26+
HTTP_DELETE,
27+
HTTP_PUT,
28+
HTTP_HEAD,
29+
HTTP_PATCH,
30+
HTTP_CONNECT,
31+
HTTP_OPTIONS,
32+
HTTP_TRACE,
33+
};
34+
35+
/**
36+
* Possible default http factory vended http client implementations.
37+
*/
38+
enum class TransferLibType { DEFAULT_CLIENT = 0, CURL_CLIENT, WIN_INET_CLIENT, WIN_HTTP_CLIENT };
39+
40+
/**
41+
* Configuration for a HTTP client, currently used only by libCurl
42+
*/
43+
enum class TransferLibPerformanceMode {
44+
LOW_LATENCY = 0, // run http client for a lower latency, at the expense of CPU
45+
REGULAR
46+
};
47+
48+
namespace HttpMethodMapper {
49+
/**
50+
* Gets the string value of an httpMethod.
51+
*/
52+
AWS_CORE_API const char* GetNameForHttpMethod(HttpMethod httpMethod);
53+
} // namespace HttpMethodMapper
6054

6155
typedef std::pair<Aws::String, Aws::String> HeaderValuePair;
6256
typedef Aws::Map<Aws::String, Aws::String> HeaderValueCollection;

src/aws-cpp-sdk-core/source/http/HttpTypes.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,15 @@ const char* GetNameForHttpMethod(HttpMethod httpMethod)
3131
return "HEAD";
3232
case HttpMethod::HTTP_PATCH:
3333
return "PATCH";
34+
case HttpMethod::HTTP_CONNECT:
35+
return "CONNECT";
36+
case HttpMethod::HTTP_OPTIONS:
37+
return "OPTIONS";
38+
case HttpMethod::HTTP_TRACE:
39+
return "TRACE";
3440
default:
35-
assert(0);
36-
return "GET";
41+
assert(0);
42+
return "GET";
3743
}
3844
}
3945

0 commit comments

Comments
 (0)