MCPcopy Create free account
hub / github.com/antirez/botlib / makeHTTPGETCallWriterSDS

Function makeHTTPGETCallWriterSDS

botlib.c:238–244  ·  view source on GitHub ↗

The callback concatenating data arriving from CURL http requests into * a target SDS string. */

Source from the content-addressed store, hash-verified

236/* The callback concatenating data arriving from CURL http requests into
237 * a target SDS string. */
238size_t makeHTTPGETCallWriterSDS(char *ptr, size_t size, size_t nmemb, void *userdata)
239{
240 UNUSED(size);
241 sds *body = userdata;
242 *body = sdscatlen(*body,ptr,nmemb);
243 return nmemb;
244}
245
246/* The callback writing the CURL reply to a file. */
247size_t makeHTTPGETCallWriterFILE(char *ptr, size_t size, size_t nmemb, void *userdata)

Callers

nothing calls this directly

Calls 1

sdscatlenFunction · 0.85

Tested by

no test coverage detected