RCurl
01 Syntax
SMRUCC.Rsharp.Runtime.Internal.Invokes.RCurl
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| guessMIMEType | 1 | Infer the MIME type from a file name This function returns the MIME type, i.e. |
03 Members
Infer the MIME type from a file name
This function returns the MIME type, i.e. part of the value used in the Content-Type for an HTTP request/response or in email to identify the nature of the content. This is a string such as "text/plain" or "text/xml" or "image/png".
The Function consults an R Object constructed by reading a Web site Of known MIME types (Not necessarily all) And matching the extension Of the file name To the names Of that table.
Parameters
| Name | Type | Description |
|---|---|---|
name | Object | character vector of file names |
default | String | the value to use if no MIME type is found in the table for the given file name/extension. |
Example
guessMIMEType(["file.json" "data.dat" "image.png" "page.html"])