Allow file upload

- add upload/simple
 - add upload/poll_upload
 - add "put" command to mfshell
 - add http POST method
This commit is contained in:
josch
2014-12-04 10:34:54 +01:00
parent 1e15dcc16b
commit f1bf926145
12 changed files with 515 additions and 12 deletions

View File

@@ -21,7 +21,7 @@
#include <jansson.h>
#include <stddef.h>
#include <stdio.h>
#include <stdint.h>
typedef struct mfhttp mfhttp;
@@ -36,9 +36,12 @@ int http_post_buf(mfhttp * conn, const char *url,
void *data);
int http_get_file(mfhttp * conn, const char *url,
const char *path);
int http_post_file(mfhttp * conn, const char *url,
const char *post_args, FILE * fd);
json_t *http_parse_buf_json(mfhttp * conn, size_t flags,
json_error_t * error);
int http_post_file(mfhttp * conn, const char *url,
const char *path, const char *filename,
uint64_t filesize, const char *fhash,
int (*data_handler) (mfhttp * conn, void *data),
void *data);
#endif