Conscience Core
Public Member Functions | List of all members
conscience_core::communication::HTTP::HttpResponse Class Reference

#include <CscHttpClient.h>

Public Member Functions

 HttpResponse (const long code, const string &content, const map< string, string > &headers)
 
const string & getContent () const
 
ptr< CscJsonObjectReadergetContentAsJson () const
 
template<class T >
vector< T > getContentAsJsonArray () const
 
const long & getCode () const
 
const map< string, string > & getHeaders ()
 
optional< string > getHeader (const string &headerName) const
 

Constructor & Destructor Documentation

◆ HttpResponse()

conscience_core::communication::HTTP::HttpResponse::HttpResponse ( const long  code,
const string &  content,
const map< string, string > &  headers 
)

Member Function Documentation

◆ getCode()

const long & conscience_core::communication::HTTP::HttpResponse::getCode ( ) const

◆ getContent()

const string & conscience_core::communication::HTTP::HttpResponse::getContent ( ) const

◆ getContentAsJson()

ptr< CscJsonObjectReader > conscience_core::communication::HTTP::HttpResponse::getContentAsJson ( ) const

◆ getContentAsJsonArray()

template<class T >
vector<T> conscience_core::communication::HTTP::HttpResponse::getContentAsJsonArray ( ) const
inline

valid types for T: double, int, uint, string , CscJsonObjectReader* or ptr<CscJsonObjectReader>

◆ getHeader()

optional< string > conscience_core::communication::HTTP::HttpResponse::getHeader ( const string &  headerName) const

look for header value for given name. Name search will be CASE INSENSITIVE

◆ getHeaders()

const map< string, string > & conscience_core::communication::HTTP::HttpResponse::getHeaders ( )

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