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.

How to send form data in POST request in Swift 3

I am trying to post form-data using webservice, userName & password, but in response it's showing an error stating "Could …

post swift3 ios10 content-type form-data
How to programmatically get content type name in Drupal 8

I'm working on Drupal 8. And I want to get content type machine name and label. Here is my code: $cont_…

content-type drupal-8
HttpServletResponse#sendError How to change ContentType

I'm creating a simple Servlet to answer a form submition. This servlet receive POST request and should response Application/JSON …

servlets content-type http-error
set content-type to json in symfony

I am using symfony 1.4, to create my project with propel as ORM. i want to get the response in JSON …

json symfony1 content-type
URLConnection does not get the charset

I'm using URL.openConnection() to download something from a server. The server says Content-Type: text/plain; charset=utf-8 But connection.…

java http content-type httpurlconnection urlconnection
Wrong Content-Type header generated using MultipartFormDataContent

I have the following code: private static string boundary = "----CustomBoundary" + DateTime.Now.Ticks.ToString("x"); private static async Task<…

c# .net-4.5 content-type multipartform-data dotnet-httpclient
Is Restlet returning 415 Unsupported Media Type when it should return 400 Bad Request?

I'm using Restlet 2.1 with jackson to build a json REST api. When I make a request with the expected content …

java rest content-type jackson restlet-2.0
How to get MIME-type of an image with file_get_contents in PHP

I need to get the MIME type of an image, but I only have the body of the image which …

php http mime-types file-get-contents content-type
How To Create New Content Type Programmatically in Drupal 7?

I'm building a module (my_module) in Drupal 7. It has some functionality and also will create new content type. In …

drupal module drupal-7 content-type
Display raw image content-type in vue.js

I am retrieving an image from a REST API via an HTTP GET with a request body. I've managed to …

javascript vue.js content-type imagejpeg