The web has mostly agreed on this standardized mimetype and e.g.
trying to open an API URI with Firefox is now opened in its friendly
JSON viewer rather than downloaded.
htsmsg_json_serialize(m, &hc->hc_reply, 0);
htsmsg_destroy(m);
- http_output_content(hc, "text/x-json; charset=UTF-8");
+ http_output_content(hc, "application/json; charset=UTF-8");
return 0;
}
resp = htsmsg_create_map();
if (resp) {
htsmsg_json_serialize(resp, &hc->hc_reply, 0);
- http_output_content(hc, "text/x-json; charset=UTF-8");
+ http_output_content(hc, "application/json; charset=UTF-8");
htsmsg_destroy(resp);
}