SMACC2
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
cl_http::ClHttp::Server Class Reference
Collaboration diagram for cl_http::ClHttp::Server:
Collaboration graph

Public Member Functions

 Server (const std::string &server_name)
 
bool isSSL () const
 
std::string getPort () const
 
std::string getServerName () const
 

Private Attributes

std::string server_name_
 
bool ssl_
 

Detailed Description

Definition at line 40 of file cl_http_client.hpp.

Constructor & Destructor Documentation

◆ Server()

cl_http::ClHttp::Server::Server ( const std::string &  server_name)
inlineexplicit

Definition at line 43 of file cl_http_client.hpp.

43 : server_name_{server_name}, ssl_{true}
44 {
45 if (!server_name_.substr(0, 7).compare("http://"))
46 {
47 ssl_ = false;
48 server_name_.erase(0, 7);
49 }
50 else if (!server_name_.substr(0, 8).compare("https://"))
51 {
52 server_name_.erase(0, 8);
53 ssl_ = true;
54 }
55 }

References server_name_, and ssl_.

Member Function Documentation

◆ getPort()

std::string cl_http::ClHttp::Server::getPort ( ) const
inline

Definition at line 59 of file cl_http_client.hpp.

59{ return ssl_ ? "443" : "80"; }

References ssl_.

Referenced by cl_http::ClHttp::makeRequest().

Here is the caller graph for this function:

◆ getServerName()

std::string cl_http::ClHttp::Server::getServerName ( ) const
inline

Definition at line 61 of file cl_http_client.hpp.

61{ return server_name_; }

References server_name_.

Referenced by cl_http::ClHttp::makeRequest().

Here is the caller graph for this function:

◆ isSSL()

bool cl_http::ClHttp::Server::isSSL ( ) const
inline

Definition at line 57 of file cl_http_client.hpp.

57{ return ssl_; }

References ssl_.

Referenced by cl_http::ClHttp::makeRequest().

Here is the caller graph for this function:

Member Data Documentation

◆ server_name_

std::string cl_http::ClHttp::Server::server_name_
private

Definition at line 64 of file cl_http_client.hpp.

Referenced by getServerName(), and Server().

◆ ssl_

bool cl_http::ClHttp::Server::ssl_
private

Definition at line 65 of file cl_http_client.hpp.

Referenced by getPort(), isSSL(), and Server().


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