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

Function processPutTask

native/cocos/network/HttpClient.cpp:291–295  ·  view source on GitHub ↗

Process PUT Request

Source from the content-addressed store, hash-verified

289
290//Process PUT Request
291static int processPutTask(HttpClient *client, HttpRequest *request, write_callback callback, void *stream, long *responseCode, write_callback headerCallback, void *headerStream, char *errorBuffer) {
292 CURLRaii curl;
293 bool ok = curl.init(client, request, callback, stream, headerCallback, headerStream, errorBuffer) && curl.setOption(CURLOPT_CUSTOMREQUEST, "PUT") && curl.setOption(CURLOPT_POSTFIELDS, request->getRequestData()) && curl.setOption(CURLOPT_POSTFIELDSIZE, request->getRequestDataSize()) && curl.perform(responseCode);
294 return ok ? 0 : 1;
295}
296
297//Process HEAD Request
298static int processHeadTask(HttpClient *client, HttpRequest *request, write_callback callback, void *stream, long *responseCode, write_callback headerCallback, void *headerStream, char *errorBuffer) {

Callers 1

processResponseMethod · 0.85

Calls 3

setOptionMethod · 0.80
performMethod · 0.80
initMethod · 0.65

Tested by

no test coverage detected