PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
WebserviceWriteMIMEType (Function)
In french: WebserviceEcritTypeMIME
AjaxNot available
Indicates the MIME type of the response returned by the Webservice (case of a call to a REST Webservice).
Example
// Returns either JSON, or XML, or nothing
IF bReturnJSON THEN
WebserviceWriteMIMEType("application/json")
RESULT ...
ELSE IF bReturnXML THEN
WebserviceWriteMIMEType("application/xml")
RESULT ...
ELSE
WebserviceWriteHTTPCode(204)
END
Syntax
WebserviceWriteMIMEType(<MIME type>)
<MIME type>: Character string (with quotes) or Integer constant
MIME type of response returned by the Webservice.
Hundreds of types are defined in the MIMI communication standard (available on Internet).
  • MIME type expressed in character string format. The most common values are:
    • "text/html": HTML page (*.htm, *.html)
    • "text/plain": text file (*.txt)
    • "application/pdf": document in PDF format (*.pdf)
    • "image/gif": image in GIF format (*.gif)
    • "image/jpeg": image in JPEG format (*.jpg, *.jpeg)
    • "video/mpeg": video in MPEG format (*.mpg, *.mpeg)
    • "application/unknown": used to display a dialog box proposing to download the file onto the computer of Web user.
    • "application/msword": used to display a Word file.
    • "application/vnd.ms-excel": used to display an Excel file.
  • Versions 22 and later
    MIME type corresponding to one of the following constants:
    Versions 22 and later
    typeMimeXMLApplication
    New in version 22
    typeMimeXMLApplication
    typeMimeXMLApplication
    XML content.
    Versions 22 and later
    typeMimeBinary
    New in version 22
    typeMimeBinary
    typeMimeBinary
    Binary content (byte stream).
    Versions 22 and later
    typeMimeDOC
    New in version 22
    typeMimeDOC
    typeMimeDOC
    Content such as Word file (*.doc)
    Versions 22 and later
    typeMimeDOCX
    New in version 22
    typeMimeDOCX
    typeMimeDOCX
    Content such as Word file (*.docx)
    Versions 22 and later
    typeMimeGIF
    New in version 22
    typeMimeGIF
    typeMimeGIF
    Content such as Image in GIF format (*.gif)
    Versions 22 and later
    typeMimeHTML
    New in version 22
    typeMimeHTML
    typeMimeHTML
    Content such as HTML page (*.htm, *.html)
    Versions 22 and later
    typeMimeJPEG
    New in version 22
    typeMimeJPEG
    typeMimeJPEG
    Content such as image in JPEG format (*.jpg, *.jpeg)
    Versions 22 and later
    typeMimeJSON
    New in version 22
    typeMimeJSON
    typeMimeJSON
    JSON content.
    Versions 22 and later
    typeMimePDF
    New in version 22
    typeMimePDF
    typeMimePDF
    Content such as PDF document (*.pdf)
    Versions 22 and later
    typeMimePNG
    New in version 22
    typeMimePNG
    typeMimePNG
    Content such as image in JPEG format (*.png)
    Versions 22 and later
    typeMimeSOAP
    New in version 22
    typeMimeSOAP
    typeMimeSOAP
    SOAP content in XML format.
    Versions 22 and later
    typeMimeText
    New in version 22
    typeMimeText
    typeMimeText
    Content in text format (*.txt)
    Versions 22 and later
    typeMimeXMLText
    New in version 22
    typeMimeXMLText
    typeMimeXMLText
    Text content in XML format
    Versions 22 and later
    typeMimeXLS
    New in version 22
    typeMimeXLS
    typeMimeXLS
    Content in Excel format (*.xls)
    Versions 22 and later
    typeMimeXLSX
    New in version 22
    typeMimeXLSX
    typeMimeXLSX
    Content in Excel format (*.xlsx)
    Versions 22 and later
    typeMimeZIP
    New in version 22
    typeMimeZIP
    typeMimeZIP
    Content in ZIP format (*.zip)
    New in version 22
    MIME type corresponding to one of the following constants:
    Versions 22 and later
    typeMimeXMLApplication
    New in version 22
    typeMimeXMLApplication
    typeMimeXMLApplication
    XML content.
    Versions 22 and later
    typeMimeBinary
    New in version 22
    typeMimeBinary
    typeMimeBinary
    Binary content (byte stream).
    Versions 22 and later
    typeMimeDOC
    New in version 22
    typeMimeDOC
    typeMimeDOC
    Content such as Word file (*.doc)
    Versions 22 and later
    typeMimeDOCX
    New in version 22
    typeMimeDOCX
    typeMimeDOCX
    Content such as Word file (*.docx)
    Versions 22 and later
    typeMimeGIF
    New in version 22
    typeMimeGIF
    typeMimeGIF
    Content such as Image in GIF format (*.gif)
    Versions 22 and later
    typeMimeHTML
    New in version 22
    typeMimeHTML
    typeMimeHTML
    Content such as HTML page (*.htm, *.html)
    Versions 22 and later
    typeMimeJPEG
    New in version 22
    typeMimeJPEG
    typeMimeJPEG
    Content such as image in JPEG format (*.jpg, *.jpeg)
    Versions 22 and later
    typeMimeJSON
    New in version 22
    typeMimeJSON
    typeMimeJSON
    JSON content.
    Versions 22 and later
    typeMimePDF
    New in version 22
    typeMimePDF
    typeMimePDF
    Content such as PDF document (*.pdf)
    Versions 22 and later
    typeMimePNG
    New in version 22
    typeMimePNG
    typeMimePNG
    Content such as image in JPEG format (*.png)
    Versions 22 and later
    typeMimeSOAP
    New in version 22
    typeMimeSOAP
    typeMimeSOAP
    SOAP content in XML format.
    Versions 22 and later
    typeMimeText
    New in version 22
    typeMimeText
    typeMimeText
    Content in text format (*.txt)
    Versions 22 and later
    typeMimeXMLText
    New in version 22
    typeMimeXMLText
    typeMimeXMLText
    Text content in XML format
    Versions 22 and later
    typeMimeXLS
    New in version 22
    typeMimeXLS
    typeMimeXLS
    Content in Excel format (*.xls)
    Versions 22 and later
    typeMimeXLSX
    New in version 22
    typeMimeXLSX
    typeMimeXLSX
    Content in Excel format (*.xlsx)
    Versions 22 and later
    typeMimeZIP
    New in version 22
    typeMimeZIP
    typeMimeZIP
    Content in ZIP format (*.zip)
    MIME type corresponding to one of the following constants:
    Versions 22 and later
    typeMimeXMLApplication
    New in version 22
    typeMimeXMLApplication
    typeMimeXMLApplication
    XML content.
    Versions 22 and later
    typeMimeBinary
    New in version 22
    typeMimeBinary
    typeMimeBinary
    Binary content (byte stream).
    Versions 22 and later
    typeMimeDOC
    New in version 22
    typeMimeDOC
    typeMimeDOC
    Content such as Word file (*.doc)
    Versions 22 and later
    typeMimeDOCX
    New in version 22
    typeMimeDOCX
    typeMimeDOCX
    Content such as Word file (*.docx)
    Versions 22 and later
    typeMimeGIF
    New in version 22
    typeMimeGIF
    typeMimeGIF
    Content such as Image in GIF format (*.gif)
    Versions 22 and later
    typeMimeHTML
    New in version 22
    typeMimeHTML
    typeMimeHTML
    Content such as HTML page (*.htm, *.html)
    Versions 22 and later
    typeMimeJPEG
    New in version 22
    typeMimeJPEG
    typeMimeJPEG
    Content such as image in JPEG format (*.jpg, *.jpeg)
    Versions 22 and later
    typeMimeJSON
    New in version 22
    typeMimeJSON
    typeMimeJSON
    JSON content.
    Versions 22 and later
    typeMimePDF
    New in version 22
    typeMimePDF
    typeMimePDF
    Content such as PDF document (*.pdf)
    Versions 22 and later
    typeMimePNG
    New in version 22
    typeMimePNG
    typeMimePNG
    Content such as image in JPEG format (*.png)
    Versions 22 and later
    typeMimeSOAP
    New in version 22
    typeMimeSOAP
    typeMimeSOAP
    SOAP content in XML format.
    Versions 22 and later
    typeMimeText
    New in version 22
    typeMimeText
    typeMimeText
    Content in text format (*.txt)
    Versions 22 and later
    typeMimeXMLText
    New in version 22
    typeMimeXMLText
    typeMimeXMLText
    Text content in XML format
    Versions 22 and later
    typeMimeXLS
    New in version 22
    typeMimeXLS
    typeMimeXLS
    Content in Excel format (*.xls)
    Versions 22 and later
    typeMimeXLSX
    New in version 22
    typeMimeXLSX
    typeMimeXLSX
    Content in Excel format (*.xlsx)
    Versions 22 and later
    typeMimeZIP
    New in version 22
    typeMimeZIP
    typeMimeZIP
    Content in ZIP format (*.zip)
Remarks
This function is only available during the call to a function that processes a request of a REST Webservice. In the other cases, the function has no action.
Component : wd240awws.dll
Minimum version required
  • Version 22
This page is also available for…
Comments
Click [Add] to post a comment