CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
http_request_message.h
1
2#pragma once
3
4#include <net/http/headers/http_request_headers.h>
5#include <net/http/http_content.h>
6#include <net/http/http_method.h>
7#include <cstdint>
8#include <system/collections/idictionary.h>
9#include <system/idisposable.h>
10#include <system/object.h>
11#include <system/shared_ptr.h>
12#include <system/string.h>
13#include <system/uri.h>
14#include <system/version.h>
15
16namespace System { namespace Net { namespace Http {
17
22class ASPOSECPP_SHARED_CLASS HttpRequestMessage : public System::IDisposable
23{
28
30 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
32 ASPOSECPP_SHARED_RTTI_INFO_DECL();
33
34public:
37 ASPOSECPP_SHARED_API System::Version get_Version();
40 ASPOSECPP_SHARED_API void set_Version(System::Version value);
46 ASPOSECPP_SHARED_API void set_Content(System::SharedPtr<HttpContent> value);
52 ASPOSECPP_SHARED_API void set_Method(System::SharedPtr<HttpMethod> value);
55 ASPOSECPP_SHARED_API System::SharedPtr<Uri> get_RequestUri();
58 ASPOSECPP_SHARED_API void set_RequestUri(System::SharedPtr<Uri> value);
66
68 ASPOSECPP_SHARED_API HttpRequestMessage();
76 ASPOSECPP_SHARED_API HttpRequestMessage(System::SharedPtr<HttpMethod> method, String requestUri);
77
79 ASPOSECPP_SHARED_API String ToString() const override;
82 ASPOSECPP_SHARED_API bool MarkAsSent();
84 ASPOSECPP_SHARED_API void Dispose() override;
85
86protected:
89 virtual void Dispose(bool disposing);
90#ifdef ASPOSE_GET_SHARED_MEMBERS
92 void GetSharedMembers(System::Object::shared_members_type& result) const override;
93#endif
94private:
96 static const int32_t MessageNotYetSent;
98 static const int32_t MessageAlreadySent;
100 int32_t _sendStatus;
104 System::SharedPtr<Uri> _requestUri;
108 System::Version _version;
112 bool _disposed;
115
119 void InitializeValues(System::SharedPtr<HttpMethod> method, System::SharedPtr<Uri> requestUri);
122 void CheckDisposed();
123};
124
125}}} // namespace System::Net::Http
Defines method that releases resources owned by the current object. Objects of this class should only...
Definition: idisposable.h:30
Represents an HTTP request message. Objects of this class should only be allocated using System::Make...
Definition: http_request_message.h:23
System::Version get_Version()
Gets the HTTP version.
void set_Version(System::Version value)
Sets the HTTP version.
void Dispose() override
Disposes the current instance. This method also disposes content of the HTTP request.
void set_Method(System::SharedPtr< HttpMethod > value)
Sets the HTTP request method.
System::SharedPtr< Collections::Generic::IDictionary< String, System::SharedPtr< Object > > > get_Properties()
Returns the collection of the HTTP request properties.
String ToString() const override
Analog of C# Object.ToString() method. Enables converting custom objects to string.
void set_RequestUri(System::SharedPtr< Uri > value)
Sets the URI of the requested resource.
bool MarkAsSent()
Marks the current request as sent.
HttpRequestMessage()
Constructs a new instance.
System::SharedPtr< HttpContent > get_Content()
Gets content of the HTTP request.
void set_Content(System::SharedPtr< HttpContent > value)
Sets content of the HTTP request.
System::SharedPtr< Uri > get_RequestUri()
Gets the URI of the requested resource.
System::SharedPtr< System::Net::Http::Headers::HttpRequestHeaders > get_Headers()
Returns the HTTP content headers.
HttpRequestMessage(System::SharedPtr< HttpMethod > method, System::SharedPtr< Uri > requestUri)
Constructs a new instance.
System::SharedPtr< HttpMethod > get_Method()
Gets the HTTP request method.
HttpRequestMessage(System::SharedPtr< HttpMethod > method, String requestUri)
Constructs a new instance.
virtual void Dispose(bool disposing)
Disposes the current instance. This method also disposes content of the HTTP request.
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
String class used across the library. Is a substitute for C# System.String when translating code....
Definition: string.h:122
Represents a version number. This type should be allocated on stack and passed to functions by value ...
Definition: version.h:15
Definition: db_command.h:9