OpenRCT2/src/network/http.h

23 lines
522 B
C
Raw Normal View History

2015-05-25 21:36:40 +02:00
#ifndef _HTTP_H_
#define _HTTP_H_
#ifndef DISABLE_HTTP
#include <jansson.h>
2015-05-25 21:36:40 +02:00
#include "../common.h"
typedef struct {
int status_code;
json_t *root;
} http_json_response;
http_json_response *http_request_json(const char *url);
void http_request_json_async(const char *url, void (*callback)(http_json_response*));
void http_request_json_dispose(http_json_response *response);
#endif // DISABLE_HTTP
// These callbacks are defined anyway, but are dummy if HTTP is disabled
void http_init();
void http_dispose();
2015-05-25 21:36:40 +02:00
#endif