c-rss/include/requests.h
2024-08-20 09:38:47 -05:00

29 lines
506 B
C

#ifdef __cplusplus
extern "C" {
#endif
#include <stddef.h>
#ifndef __SHILLERBEN_REQUESTS__
#define __SHILLERBEN_REQUESTS__
typedef struct GetRequestResult GetRequestResult;
struct GetRequestResult {
int errorCode;
size_t size;
size_t capacity;
char *data;
};
void requestsInit(void);
void requestsCleanup(void);
GetRequestResult requestsGet(const char* url);
size_t _getRequestCb(char *buffer, size_t size, size_t nmemb, GetRequestResult *result);
#endif
#ifdef __cplusplus
}
#endif