PHttpResponse Class Reference

Detailed Description

The PHttpResponse class is used to ease processing HTTP responses.

Definition at line 27 of file PHttpResponse.h.

#include <PHttpResponse.h>

Constructor & Destructor Documentation

◆ PHttpResponse()

PHttpResponse::PHttpResponse ( )

Constructs an empty PHttpResponse object.

◆ ~PHttpResponse()

virtual PHttpResponse::~PHttpResponse ( )

Destroys this object.

Member Function Documentation

◆ AddHeaderField()

void PHttpResponse::AddHeaderField ( const PString field,
const PString value 

Adds a new HTTP header field.

If the field already exists, its value is replaced.

◆ GetBody()

PString PHttpResponse::GetBody ( ) const

Returns the entire HTTP body as a PString.

◆ GetHeader()

PString PHttpResponse::GetHeader ( ) const

Returns the entire HTTP header as a PString.

◆ GetHeaderFieldNames()

PList PHttpResponse::GetHeaderFieldNames ( ) const

Returns all the HTTP header fields in a list.

◆ GetHeaderFieldValue()

PString PHttpResponse::GetHeaderFieldValue ( const PString name) const

Returns a specific HTTP header field bearing given field name or an empty string if the name is not found.

◆ GetStatusCode()

papillon::int32 PHttpResponse::GetStatusCode ( ) const

Returns the HTTP status code.

◆ SetBody()

void PHttpResponse::SetBody ( const PString body)

Sets the entire HTTP body of this response.

◆ SetHeader()

void PHttpResponse::SetHeader ( const PString header)

Sets the entire HTTP header of this response.

◆ SetStatusCode()

void PHttpResponse::SetStatusCode ( papillon::int32  statusCode)

Sets the HTTP status code with given value.