MCPcopy Create free account
hub / github.com/cocos/cocos-engine / processPatchTask

Function processPatchTask

native/cocos/network/HttpClient.cpp:312–316  ·  view source on GitHub ↗

Process PATCH Request

Source from the content-addressed store, hash-verified

310
311//Process PATCH Request
312static int processPatchTask(HttpClient *client, HttpRequest *request, write_callback callback, void *stream, long *responseCode, write_callback headerCallback, void *headerStream, char *errorBuffer) {
313 CURLRaii curl;
314 bool ok = curl.init(client, request, callback, stream, headerCallback, headerStream, errorBuffer) && curl.setOption(CURLOPT_CUSTOMREQUEST, "PATCH") && curl.setOption(CURLOPT_POSTFIELDS, request->getRequestData()) && curl.setOption(CURLOPT_POSTFIELDSIZE, request->getRequestDataSize()) && curl.perform(responseCode);
315 return ok ? 0 : 1;
316}
317
318// HttpClient implementation
319HttpClient *HttpClient::getInstance() {

Callers 1

processResponseMethod · 0.85

Calls 3

setOptionMethod · 0.80
performMethod · 0.80
initMethod · 0.65

Tested by

no test coverage detected