| 92 | }; |
| 93 | |
| 94 | static void content(const std::string &contentEncoding, const std::string &contentMediaType, const json &instance) |
| 95 | { |
| 96 | std::cerr << "mediaType: '" << contentMediaType << "', encoding: '" << contentEncoding << "'\n"; |
| 97 | |
| 98 | if (contentEncoding == "binary") { |
| 99 | if (instance.type() != json::value_t::binary) { |
| 100 | throw std::invalid_argument{"expected binary data"}; |
| 101 | } |
| 102 | } else { |
| 103 | if (instance.type() == json::value_t::binary) { |
| 104 | throw std::invalid_argument{"expected string, but get binary"}; |
| 105 | } |
| 106 | } |
| 107 | } |
| 108 | |
| 109 | int main() |
| 110 | { |
nothing calls this directly
no outgoing calls
no test coverage detected