| 493 | } |
| 494 | |
| 495 | void DataStorageController::SendBinaryResponse(httplib::Response& res, const std::string& data, |
| 496 | const std::string& filename) |
| 497 | { |
| 498 | res.status = 200; |
| 499 | res.set_content(data, MIME_APPLICATION_OCTET_STREAM); |
| 500 | // Content-Disposition includes filename with extension; format can be derived from extension |
| 501 | res.set_header(HEADER_CONTENT_DISPOSITION, "attachment; filename=\"" + filename + "\""); |
| 502 | } |
| 503 | |
| 504 | NodeQueryParams DataStorageController::ParseNodeQueryParams(const httplib::Request& req) const |
| 505 | { |
no outgoing calls
no test coverage detected