MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / cancel_request

Method cancel_request

scene/main/http_request.cpp:193–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

191}
192
193void HTTPRequest::cancel_request() {
194 timer->stop();
195
196 if (!requesting) {
197 return;
198 }
199
200 if (!use_threads.is_set()) {
201 set_process_internal(false);
202 } else {
203 thread_request_quit.set();
204 if (thread.is_started()) {
205 thread.wait_to_finish();
206 }
207 }
208
209 file.unref();
210 decompressor.unref();
211 client->close();
212 body.clear();
213 got_response = false;
214 response_code = -1;
215 request_sent = false;
216 requesting = false;
217}
218
219bool HTTPRequest::_handle_response(bool *ret_value) {
220 if (!client->has_response()) {

Callers 3

_make_requestMethod · 0.80
_api_requestMethod · 0.80

Calls 8

closeMethod · 0.65
stopMethod · 0.45
is_setMethod · 0.45
setMethod · 0.45
is_startedMethod · 0.45
wait_to_finishMethod · 0.45
unrefMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected