|
|
|
|
|
WebserviceWriteMIMEType (Function) In french: WebserviceEcritTypeMIME
Not available
Indicates the MIME type of the response returned by the web service (case of a call to a REST web service).
IF bRetourJSON THEN
WebserviceWriteMIMEType("application/json")
RETURN ...
ELSE IF bRetourXML THEN
WebserviceWriteMIMEType("application/xml")
RETURN ...
ELSE
WebserviceWriteHTTPCode(204)
END
Syntax
WebserviceWriteMIMEType(<MIME type>)
<MIME type>: Character string or Integer constant MIME type of the response returned by the web service. Hundreds of types are defined in the MIME communication standard (available on the Internet). - MIME type expressed as a character string. The most common values are:
- "text/html": HTML page (*.htm, *.html)
- "text/plain": text file (*.txt)
- "application/pdf": PDF file (*.pdf)
- "image/gif": GIF image (*.gif)
- "image/jpeg": JPEG image (*.jpg, *.jpeg)
- "video/mpeg": MPEG video (*.mpg, *.mpeg)
- "application/unknown": displays a dialog box offering to download the file to the user's computer.
- "application/msword": Opens a Microsoft Word file.
- "application/vnd.ms-excel": Opens a Microsoft Excel file.
- MIME type corresponding to one of the following constants:
| | mimeTypeXMLApplication | XML content. | mimeTypeBinary | Binary content (byte stream). | mimeTypeDOC | Word file (*.doc) | mimeTypeDOCX | Word file (*.docx) | mimeTypeGIF | GIF image (*.gif) | mimeTypeHTML | HTML page (*.htm, *.html) | mimeTypeJPEG | JPEG image (*.jpg, *.jpeg) | mimeTypeJSON | JSON content. | mimeTypePDF | PDF document (*.pdf) | mimeTypePNG | Image content in PNG format (*.png) | mimeTypeSOAP | SOAP content in XML format. | mimeTypeText | Text (*.txt) | mimeTypeXMLText | XML text | mimeTypeXLS | Excel file (*.xls) | mimeTypeXLSX | Excel file (*.xlsx) | mimeTypeZIP | ZIP file (*.zip) |
Remarks This function is only available when calling a function that processes a REST web service request. In other cases, the function has no effect.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|