SynopsisReturn the MIME type for a given URL. Prototype#include "webs.h" char_t *websUrlType(char_t *url, char_t *buf, int bufsize); Parameters
DescriptionThe websUrlType procedure returns the mime type for a given URL by examining the URL document name extension. If the mime type is unknown, "text/plain" will be returned. When using the GoAhead WebServer, the mime types are defined in mime.c. When using the GoAhead EMF, they are automatically defined. Return ValueReturns a pointer to the user supplied buffer in buf . Examplechar_t mimeType[80]; websUrlType(url, mimeType, sizeof(mimeType)); if (strcmp(mimeType, "text/plain") == 0) { } Stability ClassificationStable. See Also |