mirror of
https://github.com/simon987/sist2.git
synced 2025-12-14 07:49:06 +00:00
Initial commit (squashed)
This commit is contained in:
19
src/index/web.h
Normal file
19
src/index/web.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef SIST2_WEB_H
|
||||
#define SIST2_WEB_H
|
||||
|
||||
#include "src/sist.h"
|
||||
|
||||
typedef struct response {
|
||||
char *body;
|
||||
size_t size;
|
||||
int status_code;
|
||||
} response_t;
|
||||
|
||||
response_t *web_get(const char *url);
|
||||
response_t *web_post(const char * url, const char * data, const char* header);
|
||||
response_t *web_put(const char *url, const char *data, const char *header);
|
||||
response_t *web_delete(const char *url);
|
||||
|
||||
void free_response(response_t *resp);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user