Skip to content

Commit

Permalink
add missing http verbs in http spec
Browse files Browse the repository at this point in the history
  • Loading branch information
sbiscigl committed Nov 27, 2024
1 parent a662534 commit a39b4fa
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 38 deletions.
66 changes: 30 additions & 36 deletions src/aws-cpp-sdk-core/include/aws/core/http/HttpTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,42 +20,36 @@ namespace Aws
/**
* Models Http methods.
*/
enum class HttpMethod
{
HTTP_GET,
HTTP_POST,
HTTP_DELETE,
HTTP_PUT,
HTTP_HEAD,
HTTP_PATCH
};

/**
* Possible default http factory vended http client implementations.
*/
enum class TransferLibType
{
DEFAULT_CLIENT = 0,
CURL_CLIENT,
WIN_INET_CLIENT,
WIN_HTTP_CLIENT
};

/**
* Configuration for a HTTP client, currently used only by libCurl
*/
enum class TransferLibPerformanceMode
{
LOW_LATENCY = 0, // run http client for a lower latency, at the expense of CPU
REGULAR
};

namespace HttpMethodMapper
{
/**
* Gets the string value of an httpMethod.
*/
AWS_CORE_API const char* GetNameForHttpMethod(HttpMethod httpMethod);
enum class HttpMethod {
HTTP_GET,
HTTP_POST,
HTTP_DELETE,
HTTP_PUT,
HTTP_HEAD,
HTTP_PATCH,
HTTP_CONNECT,
HTTP_OPTIONS,
HTTP_TRACE,
};

/**
* Possible default http factory vended http client implementations.
*/
enum class TransferLibType { DEFAULT_CLIENT = 0, CURL_CLIENT, WIN_INET_CLIENT, WIN_HTTP_CLIENT };

/**
* Configuration for a HTTP client, currently used only by libCurl
*/
enum class TransferLibPerformanceMode {
LOW_LATENCY = 0, // run http client for a lower latency, at the expense of CPU
REGULAR
};

namespace HttpMethodMapper {
/**
* Gets the string value of an httpMethod.
*/
AWS_CORE_API const char* GetNameForHttpMethod(HttpMethod httpMethod);
} // namespace HttpMethodMapper

typedef std::pair<Aws::String, Aws::String> HeaderValuePair;
Expand Down
10 changes: 8 additions & 2 deletions src/aws-cpp-sdk-core/source/http/HttpTypes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,15 @@ const char* GetNameForHttpMethod(HttpMethod httpMethod)
return "HEAD";
case HttpMethod::HTTP_PATCH:
return "PATCH";
case HttpMethod::HTTP_CONNECT:
return "CONNECT";
case HttpMethod::HTTP_OPTIONS:
return "OPTIONS";
case HttpMethod::HTTP_TRACE:
return "TRACE";
default:
assert(0);
return "GET";
assert(0);
return "GET";
}
}

Expand Down

0 comments on commit a39b4fa

Please sign in to comment.