c-rss/include/requests.h

29 lines
506 B
C
Raw Normal View History

2024-08-20 14:35:05 +00:00
#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);
2024-08-20 14:38:47 +00:00
GetRequestResult requestsGet(const char* url);
2024-08-20 14:35:05 +00:00
size_t _getRequestCb(char *buffer, size_t size, size_t nmemb, GetRequestResult *result);
#endif
#ifdef __cplusplus
}
#endif