Product Information > JADE Encyclopaedia of Classes – Volume 1 > Chapter 1 - System Classes > setContentType

setContentType

setContentType(value: String,
               index: Integer io);

The setContentType method of the JadeHTTPConnection class sets "Content-Type" HTTP headers.

The value parameter specifies the string value for the Content-Type key; for example, "text/xml; charset=utf-8".

If you specify a value for the index parameter and the Content-Type key exists at the specified position in the list of headers, the corresponding entry is removed from the list if the value is null. If the value is non-null, the corresponding value is replaced. If there is no Accept key in the specified position, the key-value pair is added at this position.