comparison Core/RestApi/RestApi.cpp @ 2905:ae20fccdd867

refactoring mime types
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 30 Oct 2018 11:55:23 +0100
parents 878b59270859
children 4e43e67f8ecf
comparison
equal deleted inserted replaced
2904:0dd54ee073db 2905:ae20fccdd867
195 { 195 {
196 std::vector<std::string> accepted; 196 std::vector<std::string> accepted;
197 Toolbox::TokenizeString(accepted, it->second, ';'); 197 Toolbox::TokenizeString(accepted, it->second, ';');
198 for (size_t i = 0; i < accepted.size(); i++) 198 for (size_t i = 0; i < accepted.size(); i++)
199 { 199 {
200 if (accepted[i] == "application/xml") 200 if (accepted[i] == MIME_XML)
201 { 201 {
202 wrappedOutput.SetConvertJsonToXml(true); 202 wrappedOutput.SetConvertJsonToXml(true);
203 } 203 }
204 204
205 if (accepted[i] == "application/json") 205 if (accepted[i] == MIME_JSON)
206 { 206 {
207 wrappedOutput.SetConvertJsonToXml(false); 207 wrappedOutput.SetConvertJsonToXml(false);
208 } 208 }
209 } 209 }
210 } 210 }