DotNetDupe 4.0.6
C++17/20 Implementation of the .NET Base Class Library (BCL)
Loading...
Searching...
No Matches
HttpRequestMessage.h
Go to the documentation of this file.
1
3
4#pragma once
5#include "Common.h"
6#include "System/Object.h"
7#include "System/String.h"
8#include "System/Uri.h"
13
14namespace DotNetDupe {
15 namespace System {
16 namespace Net {
17 namespace Http {
18
24 class HttpRequestMessage : public Object {
25 public:
28
32 DOTNETDUPE_API HttpRequestMessage(const HttpMethod& method, const Uri& requestUri);
33
37 DOTNETDUPE_API HttpRequestMessage(const HttpMethod& method, const String& requestUri);
38
42
45 DOTNETDUPE_API void SetMethod(const HttpMethod& method);
46
50
53 DOTNETDUPE_API void SetRequestUri(const Uri& requestUri);
54
58
61 DOTNETDUPE_API void SetContent(const HttpContentPtr& content);
62
66
70
71 private:
72 HttpMethod m_method;
73 Uri m_requestUri;
74 HttpContentPtr m_pContent;
76 };
77
80
81 }
82 }
83 }
84}
Defines common cross-platform macros, export decorators, and fundamental types.
#define DOTNETDUPE_API
Platform-specific linkage decoration for exporting or importing library symbols.
Definition Common.h:20
Represents an HTTP entity body and associated content headers.
Represents standard HTTP method verbs defined in RFC 9110 and RFC 5789.
Base object class for DotNetDupe mirroring .NET System.Object.
Provides reference-counted and weak pointer memory management primitives ensuring zero raw ownership.
High-performance UTF-8 / UTF-16 string manipulation class mirroring .NET System.String.
Provides an object representation of a Uniform Resource Identifier (URI) and easy access to its parts...
Represents a collection of keys and values.
Definition Dictionary.h:66
A helper class for retrieving and comparing standard HTTP methods.
Definition HttpMethod.h:19
HttpRequestMessage()
Initializes a new instance of HttpRequestMessage with default GET method and localhost URI.
void SetRequestUri(const Uri &requestUri)
Sets the Uri used for the HTTP request.
HttpMethod GetMethod() const
Gets the HTTP method used by the HTTP request message.
Collections::Generic::Dictionary< String, String > & GetHeaders()
Gets the collection of HTTP request headers.
HttpContentPtr GetContent() const
Gets the contents of the HTTP message.
Uri GetRequestUri() const
Gets the Uri used for the HTTP request.
void SetContent(const HttpContentPtr &content)
Sets the contents of the HTTP message.
void SetMethod(const HttpMethod &method)
Sets the HTTP method used by the HTTP request message.
Supports all classes in the DotNetDupe class hierarchy.
Definition Object.h:18
A unified smart pointer that supports both unique and shared ownership semantics.
Represents text as a sequence of UTF-8 code units with culture-invariant operations.
Definition String.h:74
Represents an object representation of a Uniform Resource Identifier (URI) and provides easy access t...
Definition Uri.h:21
SmartPointer< HttpContent > HttpContentPtr
Type alias for reference-counted SmartPointer to HttpContent.
Definition HttpContent.h:66
SmartPointer< HttpRequestMessage > HttpRequestMessagePtr
Type alias for reference-counted SmartPointer to HttpRequestMessage.