|
|
|
|
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). // Returns either JSON, or XML, or nothing IF bReturnJSON THEN WebserviceWriteMIMEType("application/json") RETURN ... ELSE IF bReturnXML 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 document (*.pdf)
- "image/gif": GIF image (*.gif)
- "image/jpeg": JPEG image (*.jpg, *.jpeg)
- "video/mpeg": MPEG video (*.mpg, *.mpeg)
- "application/unknown": displays a dialog box allowing the user to download the file.
- "application/msword": displays a Word file.
- "application/vnd.ms-excel": displays an 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 | JPEG image (*.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…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|