#ifndef HTTP_GET_H #define HTTP_GET_H #include #include #include #include #ifdef __cplusplus extern "C" { #endif // Struct to hold response data struct Memory { char *response; size_t size; }; // Callback for libcurl to write response into our struct static size_t write_callback(void *data, size_t size, size_t nmemb, void *userp); // Function: GET request, returns heap string (caller must free) char *http_get(const char *url); #ifdef __cplusplus } #endif #endif // HTTP_GET_H