DotNetDupe
4.0.6
C++17/20 Implementation of the .NET Base Class Library (BCL)
Toggle main menu visibility
Loading...
Searching...
No Matches
HttpMethod.cpp
Go to the documentation of this file.
1
#include "
pch.h
"
2
#include "
System/Net/Http/HttpMethod.h
"
3
4
namespace
DotNetDupe
{
5
namespace
System
{
6
namespace
Net
{
7
namespace
Http
{
8
10
const
HttpMethod
HttpMethod::Get
(
"GET"
);
11
const
HttpMethod
HttpMethod::Post
(
"POST"
);
12
const
HttpMethod
HttpMethod::Put
(
"PUT"
);
13
const
HttpMethod
HttpMethod::Delete
(
"DELETE"
);
14
const
HttpMethod
HttpMethod::Head
(
"HEAD"
);
15
const
HttpMethod
HttpMethod::Options
(
"OPTIONS"
);
16
const
HttpMethod
HttpMethod::Trace
(
"TRACE"
);
17
const
HttpMethod
HttpMethod::Patch
(
"PATCH"
);
18
19
HttpMethod::HttpMethod
(
const
String
& method) : m_sMethod(method) {
21
}
22
23
String
HttpMethod::GetMethod
()
const
{
25
return
m_sMethod;
26
}
27
28
String
HttpMethod::ToString
()
const
{
30
return
m_sMethod;
31
}
32
33
bool
HttpMethod::Equals
(
const
HttpMethod
& other)
const
{
35
return
m_sMethod.
ToUpper
() == other.m_sMethod.
ToUpper
();
36
}
37
38
bool
HttpMethod::operator==
(
const
HttpMethod
& other)
const
{
40
return
Equals
(other);
41
}
42
43
bool
HttpMethod::operator!=
(
const
HttpMethod
& other)
const
{
45
return
!
Equals
(other);
46
}
47
48
}
49
}
50
}
51
}
HttpMethod.h
Represents standard HTTP method verbs defined in RFC 9110 and RFC 5789.
DotNetDupe::System::Net::Http::HttpMethod
A helper class for retrieving and comparing standard HTTP methods.
Definition
HttpMethod.h:19
DotNetDupe::System::Net::Http::HttpMethod::Head
static const HttpMethod Head
Represents an HTTP HEAD protocol method.
Definition
HttpMethod.h:57
DotNetDupe::System::Net::Http::HttpMethod::Get
static const HttpMethod Get
Represents an HTTP GET protocol method.
Definition
HttpMethod.h:49
DotNetDupe::System::Net::Http::HttpMethod::operator!=
bool operator!=(const HttpMethod &other) const
Inequality operator for HttpMethod instances.
Definition
HttpMethod.cpp:43
DotNetDupe::System::Net::Http::HttpMethod::Equals
bool Equals(const HttpMethod &other) const
Determines whether the specified HttpMethod is equal to the current HttpMethod (case-insensitive).
Definition
HttpMethod.cpp:33
DotNetDupe::System::Net::Http::HttpMethod::Trace
static const HttpMethod Trace
Represents an HTTP TRACE protocol method.
Definition
HttpMethod.h:61
DotNetDupe::System::Net::Http::HttpMethod::Put
static const HttpMethod Put
Represents an HTTP PUT protocol method.
Definition
HttpMethod.h:53
DotNetDupe::System::Net::Http::HttpMethod::ToString
String ToString() const
Returns a string that represents the current HttpMethod object.
Definition
HttpMethod.cpp:28
DotNetDupe::System::Net::Http::HttpMethod::HttpMethod
HttpMethod(const String &method)
Initializes a new instance of the HttpMethod class with a specific HTTP method name.
Definition
HttpMethod.cpp:19
DotNetDupe::System::Net::Http::HttpMethod::Post
static const HttpMethod Post
Represents an HTTP POST protocol method.
Definition
HttpMethod.h:51
DotNetDupe::System::Net::Http::HttpMethod::Delete
static const HttpMethod Delete
Represents an HTTP DELETE protocol method.
Definition
HttpMethod.h:55
DotNetDupe::System::Net::Http::HttpMethod::GetMethod
String GetMethod() const
Gets the HTTP method verb as a string.
Definition
HttpMethod.cpp:23
DotNetDupe::System::Net::Http::HttpMethod::operator==
bool operator==(const HttpMethod &other) const
Equality operator for HttpMethod instances.
Definition
HttpMethod.cpp:38
DotNetDupe::System::Net::Http::HttpMethod::Options
static const HttpMethod Options
Represents an HTTP OPTIONS protocol method.
Definition
HttpMethod.h:59
DotNetDupe::System::Net::Http::HttpMethod::Patch
static const HttpMethod Patch
Represents an HTTP PATCH protocol method.
Definition
HttpMethod.h:63
DotNetDupe::System::String
Represents text as a sequence of UTF-8 code units with culture-invariant operations.
Definition
String.h:74
DotNetDupe::System::String::ToUpper
String ToUpper() const
Definition
String.cpp:680
DotNetDupe::System::Net::Http
Definition
FileDownloader.h:22
DotNetDupe::System::Net
Definition
Dns.h:13
DotNetDupe::System
Definition
Action.h:11
DotNetDupe
Definition
IServiceCollection.h:7
pch.h
DotNetDupe
HttpMethod.cpp
Generated by
1.18.0