10#include "microhttpd.h"
19 static const char* kBaseUrl =
"/data";
20 return 0 == strcmp(method, MHD_HTTP_METHOD_GET) &&
21 0 == strncmp(url, kBaseUrl, strlen(kBaseUrl));
25 const char* url,
const char* method,
26 const char* upload_data,
size_t* upload_data_size) {
30 if (!request->hasPicture() ||
commands.size() != 2) {
35 SkRef(request->fUrlDataManager.getDataFromUrl(
SkString(url))));
38 return SendData(connection, urlData->fData.
get(), urlData->fContentType.c_str());
void SkStrSplit(const char *str, const char *delimiters, SkStrSplitMode splitMode, TArray< SkString > *out)
bool canHandle(const char *method, const char *url) override
int handle(Request *request, MHD_Connection *connection, const char *url, const char *method, const char *upload_data, size_t *upload_data_size) override
int SendData(MHD_Connection *connection, const SkData *data, const char *type, bool setContentDisposition, const char *dispositionString)