Hi bongdragon,
If you control the website you're connecting to, you should change the returned MIME type to
roschuma
application/x-json
is a MIME type (see http://en.wikipedia.org/wiki/MIME for more details on that). Casablanca expects that JSON payloads will have a MIME type of either application/json (the official MIME type for JSON), text/json, text/x-json, text/javascript, text/x-javascript, application/javascript, or application/x-javascript.If you control the website you're connecting to, you should change the returned MIME type to
application/json
. If you do not control the website, you can work around this by using extract_string
instead of extract_json
and then passing it tojson::value obj = json::value::parse(extracted_string);
Sincerely,roschuma