#include <mock_server.h>
◆ MockServer() [1/3]
httpmock::MockServer::MockServer |
( |
const MockServer & |
| ) |
|
|
private |
◆ MockServer() [2/3]
httpmock::MockServer::MockServer |
( |
MockServer && |
| ) |
|
|
private |
◆ MockServer() [3/3]
httpmock::MockServer::MockServer |
( |
int |
port = 8080 | ) |
|
|
explicit |
Create server instance. Server is not started by default. Use start().
◆ ~MockServer()
httpmock::MockServer::~MockServer |
( |
| ) |
|
|
virtual |
◆ getPort()
int httpmock::MockServer::getPort |
( |
| ) |
const |
Return port number server is running on.
◆ isRunning()
bool httpmock::MockServer::isRunning |
( |
| ) |
const |
|
overridevirtual |
◆ operator=()
◆ responseHandler()
virtual Response httpmock::MockServer::responseHandler |
( |
const std::string & |
url, |
|
|
const std::string & |
method, |
|
|
const std::string & |
data, |
|
|
const std::vector< UrlArg > & |
urlArguments = {} , |
|
|
const std::vector< Header > & |
headers = {} |
|
) |
| |
|
privatepure virtual |
HTTP response handler.
- Parameters
-
url | URL path of the request. |
method | HTTP method (GET, POST, ...). |
data | Data received during the request. |
urlArguments | Arguments passed in the URL (after ? sign). |
headers | Headers of the HTTP request. |
◆ start()
void httpmock::MockServer::start |
( |
| ) |
|
|
overridevirtual |
◆ stop()
void httpmock::MockServer::stop |
( |
| ) |
|
|
overridevirtual |
◆ port
int httpmock::MockServer::port |
|
private |
◆ server
std::unique_ptr<Server> httpmock::MockServer::server |
|
private |
The documentation for this class was generated from the following files:
- /home/runner/work/httpmockserver/httpmockserver/include/httpmockserver/mock_server.h
- /home/runner/work/httpmockserver/httpmockserver/src/mock_server.cc