Top "Content-type" questions

The Content-Type entity-header field indicates the media type of the entity-body sent to the recipient or, in the case of the HEAD method, the media type that would have been sent had the request been a GET.

What is the correct JSON content type?

I've been messing around with JSON for some time, just pushing it out as text and it hasn't hurt anybody (…

json http-headers content-type
Proper MIME media type for PDF files

When working with PDFs, I've run across the MIME types application/pdf and application/x-pdf among others. Is there a …

pdf http-headers content-type mime
HTML Input="file" Accept Attribute File Type (CSV)

I have a file upload object on my page: <input type="file" ID="fileSelect" /> with the following excel …

html csv file-upload input content-type
Setting mime type for excel document

MS Excel has the following observed MIME types: application/vnd.ms-excel (official) application/msexcel application/x-msexcel application/x-ms-excel application/x-excel …

excel content-type mime
Jquery - How to make $.post() use contentType=application/json?

I've noticed that when using $.post() in jquery that the default contentType is application/x-www-form-urlencoded - when my asp.net …

jquery ajax content-type
Cannot set content-type to 'application/json' in jQuery.ajax

When I have this code $.ajax({ type: 'POST', //contentType: "application/json", url: 'http://localhost:16329/Hello', data: { name: 'norm' }, dataType: 'json' }); …

json jquery content-type wcf-rest
What MIME type should I use for CSV?

I've seen application/csv used and also text/csv. Is there a difference? Does it matter which as long as …

csv http-headers mime-types content-type
What are all the possible values for HTTP "Content-Type" header?

I have to validate the Content-Type header value before passing it to an HTTP request. Is there a specific list …

http http-headers httprequest content-type
Is header('Content-Type:text/plain'); necessary at all?

I didn't see any difference with or without this head information yet.

php http-headers content-type head response-headers
Passing headers with axios POST request

I have written an axios POST request as recommended from the npm package documentation like: var data = { 'key1': 'val1…

json http-headers http-post axios content-type