refactor: put HTTP and XML logic into reusable modules
This commit is contained in:
16
src/Utility/HttpClient.h
Normal file
16
src/Utility/HttpClient.h
Normal file
@@ -0,0 +1,16 @@
|
||||
#ifndef HTTPCLIENT_H
|
||||
#define HTTPCLIENT_H
|
||||
|
||||
#include <curl/curl.h>
|
||||
#include <stddef.h>
|
||||
|
||||
typedef struct {
|
||||
char *memory;
|
||||
size_t size;
|
||||
size_t capacity;
|
||||
} HttpResponse;
|
||||
|
||||
HttpResponse http_get(const char *url, const char *user_agent);
|
||||
void http_response_free(HttpResponse *resp);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user