guessMIMEType {RCurl} | R Documentation |
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.
guessMIMEType(name,
default = "application/octet-stream");
guessMIMEType(["file.json" "data.dat" "image.png" "page.html"])