aws-crt-cpp
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Aws::Crt::Http::HttpMessage Class Reference

#include <HttpRequestResponse.h>

Inheritance diagram for Aws::Crt::Http::HttpMessage:
Aws::Crt::Http::HttpRequest Aws::Crt::Http::HttpResponse

Public Member Functions

virtual ~HttpMessage ()
 
 HttpMessage (const HttpMessage &)=delete
 
 HttpMessage (HttpMessage &&)=delete
 
HttpMessageoperator= (const HttpMessage &)=delete
 
HttpMessageoperator= (HttpMessage &&)=delete
 
std::shared_ptr< Aws::Crt::Io::InputStreamGetBody () const noexcept
 
bool SetBody (const std::shared_ptr< Aws::Crt::Io::IStream > &body) noexcept
 
bool SetBody (const std::shared_ptr< Aws::Crt::Io::InputStream > &body) noexcept
 
size_t GetHeaderCount () const noexcept
 
Optional< HttpHeaderGetHeader (size_t index) const noexcept
 
bool AddHeader (const HttpHeader &header) noexcept
 
bool EraseHeader (size_t index) noexcept
 
 operator bool () const noexcept
 
struct aws_http_message * GetUnderlyingMessage () const noexcept
 

Protected Member Functions

 HttpMessage (Allocator *allocator, struct aws_http_message *message, bool ownsMessage=true) noexcept
 

Protected Attributes

Allocatorm_allocator
 
struct aws_http_message * m_message
 
std::shared_ptr< Aws::Crt::Io::InputStreamm_bodyStream
 
bool m_ownsMessage
 

Detailed Description

Base class representing a mutable http request or response.

Constructor & Destructor Documentation

◆ ~HttpMessage()

Aws::Crt::Http::HttpMessage::~HttpMessage ( )
virtual

◆ HttpMessage() [1/3]

Aws::Crt::Http::HttpMessage::HttpMessage ( const HttpMessage )
delete

◆ HttpMessage() [2/3]

Aws::Crt::Http::HttpMessage::HttpMessage ( HttpMessage &&  )
delete

◆ HttpMessage() [3/3]

Aws::Crt::Http::HttpMessage::HttpMessage ( Allocator allocator,
struct aws_http_message *  message,
bool  ownsMessage = true 
)
protectednoexcept

Member Function Documentation

◆ AddHeader()

bool Aws::Crt::Http::HttpMessage::AddHeader ( const HttpHeader header)
noexcept

◆ EraseHeader()

bool Aws::Crt::Http::HttpMessage::EraseHeader ( size_t  index)
noexcept

◆ GetBody()

std::shared_ptr< Aws::Crt::Io::InputStream > Aws::Crt::Http::HttpMessage::GetBody ( ) const
noexcept

Gets the input stream representing the message body

◆ GetHeader()

Optional< HttpHeader > Aws::Crt::Http::HttpMessage::GetHeader ( size_t  index) const
noexcept

◆ GetHeaderCount()

size_t Aws::Crt::Http::HttpMessage::GetHeaderCount ( ) const
noexcept

◆ GetUnderlyingMessage()

struct aws_http_message* Aws::Crt::Http::HttpMessage::GetUnderlyingMessage ( ) const
inlinenoexcept

◆ operator bool()

Aws::Crt::Http::HttpMessage::operator bool ( ) const
inlinenoexcept

◆ operator=() [1/2]

HttpMessage& Aws::Crt::Http::HttpMessage::operator= ( const HttpMessage )
delete

◆ operator=() [2/2]

HttpMessage& Aws::Crt::Http::HttpMessage::operator= ( HttpMessage &&  )
delete

◆ SetBody() [1/2]

bool Aws::Crt::Http::HttpMessage::SetBody ( const std::shared_ptr< Aws::Crt::Io::InputStream > &  body)
noexcept

◆ SetBody() [2/2]

bool Aws::Crt::Http::HttpMessage::SetBody ( const std::shared_ptr< Aws::Crt::Io::IStream > &  body)
noexcept

Sets the input stream representing the message body

Member Data Documentation

◆ m_allocator

Allocator* Aws::Crt::Http::HttpMessage::m_allocator
protected

◆ m_bodyStream

std::shared_ptr<Aws::Crt::Io::InputStream> Aws::Crt::Http::HttpMessage::m_bodyStream
protected

◆ m_message

struct aws_http_message* Aws::Crt::Http::HttpMessage::m_message
protected

◆ m_ownsMessage

bool Aws::Crt::Http::HttpMessage::m_ownsMessage
protected

The documentation for this class was generated from the following files: