MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / startRequest

Method startRequest

Libraries/Http/HttpAsyncClient.cpp:158–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156}
157
158Result HttpAsyncClient::startRequest(AsyncEventLoop& loop, const RequestPreset& preset)
159{
160 SC_TRY_MSG(connection != nullptr, "HttpAsyncClient::start init not called");
161 SC_TRY_MSG(not webSocketUpgraded, "HttpAsyncClient connection is upgraded to WebSocket");
162
163 if (state != State::Idle and response.isBodyComplete() and not responseFinalized)
164 {
165 finalizeResponse(false);
166 }
167
168 SC_TRY_MSG(state == State::Idle, "HttpAsyncClient::start another request is in progress");
169 eventLoop = &loop;
170 return startPreparedRequest(preset);
171}
172
173Result HttpAsyncClient::startPreparedRequest(const RequestPreset& preset)
174{

Callers 1

beginRequestSendMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected