Alex Rivera | Logout

What is the correct MIME Type for JSON content?

Asked 2012-09-30T07:07:11.480
8

Possible Duplicate:
What is the correct JSON content type?

I have problem with JSON is that it is only displaying " Content-Type: text/html" I am testing on localhost and my online code is

header('Access-Control-Allow-Origin: *');

header('Content-Type: application/javascript');
//header('Content-type: text/javascript');
//header('Content-type: application/json');
Edit
Report

1 Answer

3

You should use the application/json header for JSON data:

header('Content-type: application/json');
answered 2012-09-30T07:10:45.257

Your Answer