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

Method get

lib/HttpService/src/HttpService.cpp:164–186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162}
163
164HttpJobId HttpService::get(const char* url, IHttpResponseHandler* handler)
165{
166 HttpJobId jobId = INVALID_HTTP_JOB_ID;
167 MutexGuard<Mutex> guard(m_mutex);
168
169 if ((true == m_isRunning) && (nullptr != url))
170 {
171 WorkerRequest request;
172
173 request.jobId = generateJobId();
174 request.url = url;
175 request.method = HTTP_METHOD_GET;
176 request.payload = nullptr;
177 request.size = 0U;
178 request.handler = handler;
179
180 m_requestList.emplace_back(request);
181
182 jobId = request.jobId;
183 }
184
185 return jobId;
186}
187
188HttpJobId HttpService::post(const char* url, const uint8_t* payload, size_t size, IHttpResponseHandler* handler)
189{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected