nuget server logo nuget api documents
↑

API Docs / REnv / RCurl

RCurl

Full name SMRUCC.Rsharp.Runtime.Internal.Invokes.RCurl Assembly REnv Members 1

01 Syntax

SMRUCC.Rsharp.Runtime.Internal.Invokes.RCurl

02 Methods

NameOverloadsSummary
guessMIMEType 1 Infer the MIME type from a file name This function returns the MIME type, i.e.

03 Members

method guessMIMEType #
guessMIMEType(Object, String, Environment)

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
NameTypeDescription
nameObject

character vector of file names

defaultString

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"])