#include <UrlHandler.h>
|
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 |
|
Public Member Functions inherited from UrlHandler |
virtual | ~UrlHandler () |
|
Definition at line 92 of file UrlHandler.h.
◆ canHandle()
bool DownloadHandler::canHandle |
( |
const char * |
method, |
|
|
const char * |
url |
|
) |
| |
|
overridevirtual |
Implements UrlHandler.
Definition at line 16 of file DownloadHandler.cpp.
16 {
17 return 0 == strcmp(method, MHD_HTTP_METHOD_GET) &&
18 0 == strcmp(url, "/download");
19}
◆ handle()
int DownloadHandler::handle |
( |
Request * |
request, |
|
|
MHD_Connection * |
connection, |
|
|
const char * |
url, |
|
|
const char * |
method, |
|
|
const char * |
upload_data, |
|
|
size_t * |
upload_data_size |
|
) |
| |
|
overridevirtual |
Implements UrlHandler.
Definition at line 21 of file DownloadHandler.cpp.
23 {
25 return MHD_NO;
26 }
27
29
30
31 return SendData(connection,
data.get(),
"application/octet-stream",
true,
32 "attachment; filename=something.skp;");
33}
int SendData(MHD_Connection *connection, const SkData *data, const char *type, bool setContentDisposition, const char *dispositionString)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot data
sk_sp< SkData > writeOutSkp()
The documentation for this class was generated from the following files: