| 83 | } |
| 84 | |
| 85 | http_request::http_request(const std::string &_endpoint, const std::string &_parameters, http_completion_event completion, const std::string &_postdata, http_method _method, const std::string &audit_reason, const std::string &filename, const std::string &filecontent, const std::string &filemimetype, const std::string &http_protocol) |
| 86 | : complete_handler(completion), completed(false), non_discord(false), endpoint(_endpoint), parameters(_parameters), postdata(_postdata), method(_method), reason(audit_reason), mimetype("application/json"), waiting(false), protocol(http_protocol) |
| 87 | { |
| 88 | if (!filename.empty()) { |
| 89 | file_name.push_back(filename); |
| 90 | } |
| 91 | if (!filecontent.empty()) { |
| 92 | file_content.push_back(filecontent); |
| 93 | } |
| 94 | if (!filemimetype.empty()) { |
| 95 | file_mimetypes.push_back(filemimetype); |
| 96 | } |
| 97 | } |
| 98 | |
| 99 | http_request::http_request(const std::string &_endpoint, const std::string &_parameters, http_completion_event completion, const std::string &_postdata, http_method method, const std::string &audit_reason, const std::vector<std::string> &filename, const std::vector<std::string> &filecontent, const std::vector<std::string> &filemimetypes, const std::string &http_protocol) |
| 100 | : complete_handler(completion), completed(false), non_discord(false), endpoint(_endpoint), parameters(_parameters), postdata(_postdata), method(method), reason(audit_reason), file_name(filename), file_content(filecontent), file_mimetypes(filemimetypes), mimetype("application/json"), waiting(false), protocol(http_protocol) |