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

Function processPostTask

native/cocos/network/HttpClient.cpp:284–288  ·  view source on GitHub ↗

Process POST Request

Source from the content-addressed store, hash-verified

282
283//Process POST Request
284static int processPostTask(HttpClient *client, HttpRequest *request, write_callback callback, void *stream, long *responseCode, write_callback headerCallback, void *headerStream, char *errorBuffer) {
285 CURLRaii curl;
286 bool ok = curl.init(client, request, callback, stream, headerCallback, headerStream, errorBuffer) && curl.setOption(CURLOPT_POST, 1) && curl.setOption(CURLOPT_POSTFIELDS, request->getRequestData()) && curl.setOption(CURLOPT_POSTFIELDSIZE, request->getRequestDataSize()) && curl.perform(responseCode);
287 return ok ? 0 : 1;
288}
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) {

Callers 1

processResponseMethod · 0.85

Calls 3

setOptionMethod · 0.80
performMethod · 0.80
initMethod · 0.65

Tested by

no test coverage detected