MCPcopy Create free account
hub / github.com/BlueAndi/Pixelix / initHttpClient

Method initHttpClient

src/SystemState/ConnectedState.cpp:159–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157 *****************************************************************************/
158
159void ConnectedState::initHttpClient()
160{
161 m_client.regOnResponse([](const HttpResponse& rsp) {
162 uint16_t statusCode = rsp.getStatusCode();
163
164 if (HttpStatus::STATUS_CODE_OK == statusCode)
165 {
166 LOG_INFO("Online state reported.");
167 }
168 });
169
170 m_client.regOnError([]() {
171 LOG_WARNING("Connection error happened.");
172 });
173}
174
175void ConnectedState::pushUrl(const String& pushUrl)
176{

Callers

nothing calls this directly

Calls 3

regOnResponseMethod · 0.80
getStatusCodeMethod · 0.80
regOnErrorMethod · 0.80

Tested by

no test coverage detected