* @brief Returns boundary string from Httplib response. */
| 254 | * @brief Returns boundary string from Httplib response. |
| 255 | */ |
| 256 | std::string GetBoundaryString(const httplib::Result &response) |
| 257 | { |
| 258 | httplib::Headers headers = response->headers; |
| 259 | std::string contentType = headers.find("content-type")->second; |
| 260 | std::string delimiter = "boundary="; |
| 261 | std::string boundaryString = |
| 262 | contentType.substr(contentType.find(delimiter) + delimiter.length(), std::string::npos); |
| 263 | boundaryString.insert(0, "--"); |
| 264 | return boundaryString; |
| 265 | } |
| 266 | |
| 267 | /** |
| 268 | * @brief Returns image data string from monai label overall response. |