LuciadCPillar 2024.0.08
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
luciad::HttpResponse Class Referencefinal

An HTTP response. More...

#include <luciad/net/http/HttpResponse.h>

Classes

class  Builder
 Builder for the luciad::HttpResponse class. More...
 

Public Member Functions

 HttpResponse (const HttpResponse &other)
 
 HttpResponse (HttpResponse &&other) noexcept
 
 ~HttpResponse ()
 
const std::optional< DataEntity > & getBody () const
 Returns the body of this response. More...
 
const std::vector< HttpHeader > & getHeaders () const
 Returns the received response headers. More...
 
int32_t getStatusCode () const
 Returns the status code for this response. More...
 
HttpResponseoperator= (HttpResponse other) noexcept
 

Static Public Member Functions

static Builder newBuilder ()
 Returns the new HttpResponse builder. More...
 

Detailed Description

An HTTP response.

An HttpResponse instance is built through an luciad::HttpResponse::Builder.

This class provides methods for accessing the response status code, headers and the response body.

Since
2023.0

Constructor & Destructor Documentation

◆ HttpResponse() [1/2]

luciad::HttpResponse::HttpResponse ( const HttpResponse other)

◆ HttpResponse() [2/2]

luciad::HttpResponse::HttpResponse ( HttpResponse &&  other)
noexcept

◆ ~HttpResponse()

luciad::HttpResponse::~HttpResponse ( )

Member Function Documentation

◆ getBody()

const std::optional< DataEntity > & luciad::HttpResponse::getBody ( ) const

Returns the body of this response.

Returns
the body of this response.

◆ getHeaders()

const std::vector< HttpHeader > & luciad::HttpResponse::getHeaders ( ) const

Returns the received response headers.

Returns
the received response headers.

◆ getStatusCode()

int32_t luciad::HttpResponse::getStatusCode ( ) const

Returns the status code for this response.

Returns
the status code for this response.

◆ newBuilder()

static Builder luciad::HttpResponse::newBuilder ( )
static

Returns the new HttpResponse builder.

Returns
the new HttpResponse builder.

◆ operator=()

HttpResponse & luciad::HttpResponse::operator= ( HttpResponse  other)
noexcept