As many others have mentioned, application/json
is the correct answer.
But what haven't been explained yet is what the other options you proposed mean.
application/x-javascript
: Experimental MIME type for JavaScript before application/javascript
was made standard.
text/javascript
: Now obsolete. You should use application/javascript
when using javascript.
text/x-javascript
: Experimental MIME type for the above situation.
text/x-json
: Experimental MIME type for JSON before application/json
got officially registered.
All in all, whenever you have any doubts about content types, you should check this link