| 4266 | |
| 4267 | template <typename T> |
| 4268 | inline std::string |
| 4269 | serialize_multipart_formdata_item_begin(const T &item, |
| 4270 | const std::string &boundary) { |
| 4271 | std::string body = "--" + boundary + "\r\n"; |
| 4272 | body += "Content-Disposition: form-data; name=\"" + item.name + "\""; |
| 4273 | if (!item.filename.empty()) { |
| 4274 | body += "; filename=\"" + item.filename + "\""; |
| 4275 | } |
| 4276 | body += "\r\n"; |
| 4277 | if (!item.content_type.empty()) { |
| 4278 | body += "Content-Type: " + item.content_type + "\r\n"; |
| 4279 | } |
| 4280 | body += "\r\n"; |
| 4281 | |
| 4282 | return body; |
| 4283 | } |
| 4284 | |
| 4285 | inline std::string serialize_multipart_formdata_item_end() { return "\r\n"; } |
| 4286 |
no test coverage detected