Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
Waher.Content.InternetContent Class Reference

Static class managing encoding and decoding of internet content. More...

Static Public Member Functions

static void SetDefaultTimeout (int Timeout, bool Lock)
 Sets the default timeout of internet access methods, in milliseconds. More...
 
static bool Encodes (object Object, out Grade Grade, out IContentEncoder Encoder, params string[] AcceptedContentTypes)
 If a given object can be encoded. More...
 
static ContentResponse Encode (object Object, Encoding Encoding, params string[] AcceptedContentTypes)
 Encodes an object. More...
 
static Task< ContentResponseEncodeAsync (object Object, Encoding Encoding, params string[] AcceptedContentTypes)
 Encodes an object. More...
 
static Task< ContentResponseEncodeAsync (object Object, Encoding Encoding, ICodecProgress Progress, params string[] AcceptedContentTypes)
 Encodes an object. More...
 
static bool IsAccepted (string ContentType, params string[] AcceptedContentTypes)
 Checks if a given content type is acceptable. More...
 
static bool IsAccepted (string[] ContentTypes, params string[] AcceptedContentTypes)
 Checks if at least one content type in a set of content types is acceptable. More...
 
static bool IsAccepted (string[] ContentTypes, out string ContentType, params string[] AcceptedContentTypes)
 Checks if at least one content type in a set of content types is acceptable. More...
 
static bool Decodes (string ContentType, out Grade Grade, out IContentDecoder Decoder)
 If an object with a given content type can be decoded. More...
 
static ContentResponse Decode (string ContentType, byte[] Data, Encoding Encoding, KeyValuePair< string, string >[] Fields, Uri BaseUri)
 Decodes an object. More...
 
static Task< ContentResponseDecodeAsync (string ContentType, byte[] Data, Encoding Encoding, KeyValuePair< string, string >[] Fields, Uri BaseUri)
 Decodes an object. More...
 
static Task< ContentResponseDecodeAsync (string ContentType, byte[] Data, Encoding Encoding, KeyValuePair< string, string >[] Fields, Uri BaseUri, ICodecProgress Progress)
 Decodes an object. More...
 
static ContentResponse Decode (string ContentType, byte[] Data, Uri BaseUri)
 Decodes an object. More...
 
static Task< ContentResponseDecodeAsync (string ContentType, byte[] Data, Uri BaseUri)
 Decodes an object. More...
 
static Task< ContentResponseDecodeAsync (string ContentType, byte[] Data, Uri BaseUri, ICodecProgress Progress)
 Decodes an object. More...
 
static bool ParseContentType (ref string ContentType, out Encoding Encoding, out KeyValuePair< string, string >[] Fields)
 Parses a Content-Type, providing the base Content-Type, character encoding, if any, and other field parameters available. More...
 
static Encoding GetEncoding (string CharacterSet)
 Gets a character encoding from its name. More...
 
static string GetContentType (string FileExtension)
 Gets the content type of an item, given its file extension. It uses the TryGetContentType to see if any of the content encoders/decoders support content with the corresponding file type. If no such encoder/decoder is found, the generic application/octet-stream type is returned. More...
 
static bool TryGetContentType (string FileExtension, out string ContentType)
 Tries to get the content type of an item, given its file extension. More...
 
static string GetFileExtension (string ContentType)
 Gets the file extension of an item, given its content type. It uses the TryGetFileExtension to see if any of the content encoders/decoders support content with the corresponding content type. If no such encoder/decoder is found, the generic bin extension is returned. More...
 
static bool TryGetFileExtension (string ContentType, out string FileExtension)
 Tries to get the file extension of an item, given its content type. More...
 
static bool CanConvert (string FromContentType, string ToContentType, out IContentConverter Converter)
 Checks if it is possible to convert content from one type to another. More...
 
static IContentConverter[] GetConverters (string FromContentType)
 Gets available converters that can convert content from a given type. More...
 
static bool CanGet (Uri Uri, out Grade Grade, out IContentGetter Getter)
 If a resource can be gotten, given its URI. More...
 
static Task< ContentResponseGetAsync (Uri Uri, params KeyValuePair< string, string >[] Headers)
 Gets a resource, given its URI. More...
 
static Task< ContentResponseGetAsync (Uri Uri, X509Certificate Certificate, params KeyValuePair< string, string >[] Headers)
 Gets a resource, given its URI. More...
 
static Task< ContentResponseGetAsync (Uri Uri, X509Certificate Certificate, EventHandler< RemoteCertificateEventArgs > RemoteCertificateValidator, params KeyValuePair< string, string >[] Headers)
 Gets a resource, given its URI. More...
 
static Task< ContentResponseGetAsync (Uri Uri, int TimeoutMs, params KeyValuePair< string, string >[] Headers)
 Gets a resource, given its URI. More...
 
static Task< ContentResponseGetAsync (Uri Uri, X509Certificate Certificate, int TimeoutMs, params KeyValuePair< string, string >[] Headers)
 Gets a resource, given its URI. More...
 
static Task< ContentResponseGetAsync (Uri Uri, X509Certificate Certificate, EventHandler< RemoteCertificateEventArgs > RemoteCertificateValidator, int TimeoutMs, params KeyValuePair< string, string >[] Headers)
 Gets a resource, given its URI. More...
 
static Task< ContentStreamResponseGetTempStreamAsync (Uri Uri, params KeyValuePair< string, string >[] Headers)
 Gets a (possibly big) resource, given its URI. More...
 
static Task< ContentStreamResponseGetTempStreamAsync (Uri Uri, TemporaryStream Destination, params KeyValuePair< string, string >[] Headers)
 Gets a (possibly big) resource, given its URI. More...
 
static Task< ContentStreamResponseGetTempStreamAsync (Uri Uri, X509Certificate Certificate, params KeyValuePair< string, string >[] Headers)
 Gets a (possibly big) resource, given its URI. More...
 
static Task< ContentStreamResponseGetTempStreamAsync (Uri Uri, X509Certificate Certificate, TemporaryStream Destination, params KeyValuePair< string, string >[] Headers)
 Gets a (possibly big) resource, given its URI. More...
 
static Task< ContentStreamResponseGetTempStreamAsync (Uri Uri, X509Certificate Certificate, EventHandler< RemoteCertificateEventArgs > RemoteCertificateValidator, params KeyValuePair< string, string >[] Headers)
 Gets a (possibly big) resource, given its URI. More...
 
static Task< ContentStreamResponseGetTempStreamAsync (Uri Uri, X509Certificate Certificate, EventHandler< RemoteCertificateEventArgs > RemoteCertificateValidator, TemporaryStream Destination, params KeyValuePair< string, string >[] Headers)
 Gets a (possibly big) resource, given its URI. More...
 
static Task< ContentStreamResponseGetTempStreamAsync (Uri Uri, int TimeoutMs, params KeyValuePair< string, string >[] Headers)
 Gets a (possibly big) resource, given its URI. More...
 
static Task< ContentStreamResponseGetTempStreamAsync (Uri Uri, int TimeoutMs, TemporaryStream Destination, params KeyValuePair< string, string >[] Headers)
 Gets a (possibly big) resource, given its URI. More...
 
static Task< ContentStreamResponseGetTempStreamAsync (Uri Uri, X509Certificate Certificate, int TimeoutMs, params KeyValuePair< string, string >[] Headers)
 Gets a (possibly big) resource, given its URI. More...
 
static Task< ContentStreamResponseGetTempStreamAsync (Uri Uri, X509Certificate Certificate, int TimeoutMs, TemporaryStream Destination, params KeyValuePair< string, string >[] Headers)
 Gets a (possibly big) resource, given its URI. More...
 
static Task< ContentStreamResponseGetTempStreamAsync (Uri Uri, X509Certificate Certificate, EventHandler< RemoteCertificateEventArgs > RemoteCertificateValidator, int TimeoutMs, params KeyValuePair< string, string >[] Headers)
 Gets a (possibly big) resource, given its URI. More...
 
static Task< ContentStreamResponseGetTempStreamAsync (Uri Uri, X509Certificate Certificate, EventHandler< RemoteCertificateEventArgs > RemoteCertificateValidator, int TimeoutMs, TemporaryStream Destination, params KeyValuePair< string, string >[] Headers)
 Gets a (possibly big) resource, given its URI. More...
 
static bool CanPost (Uri Uri, out Grade Grade, out IContentPoster Poster)
 If a resource can be posted to, given its URI. More...
 
static Task< ContentResponsePostAsync (Uri Uri, object Data, params KeyValuePair< string, string >[] Headers)
 Posts to a resource, using a Uniform Resource Identifier (or Locator). More...
 
static Task< ContentResponsePostAsync (Uri Uri, object Data, X509Certificate Certificate, params KeyValuePair< string, string >[] Headers)
 Posts to a resource, using a Uniform Resource Identifier (or Locator). More...
 
static Task< ContentResponsePostAsync (Uri Uri, object Data, X509Certificate Certificate, EventHandler< RemoteCertificateEventArgs > RemoteCertificateValidator, params KeyValuePair< string, string >[] Headers)
 Posts to a resource, using a Uniform Resource Identifier (or Locator). More...
 
static Task< ContentResponsePostAsync (Uri Uri, object Data, int TimeoutMs, params KeyValuePair< string, string >[] Headers)
 Posts to a resource, using a Uniform Resource Identifier (or Locator). More...
 
static Task< ContentResponsePostAsync (Uri Uri, object Data, X509Certificate Certificate, int TimeoutMs, params KeyValuePair< string, string >[] Headers)
 Posts to a resource, using a Uniform Resource Identifier (or Locator). More...
 
static Task< ContentResponsePostAsync (Uri Uri, object Data, X509Certificate Certificate, EventHandler< RemoteCertificateEventArgs > RemoteCertificateValidator, int TimeoutMs, params KeyValuePair< string, string >[] Headers)
 Posts to a resource, using a Uniform Resource Identifier (or Locator). More...
 
static Task< ContentBinaryResponsePostAsync (Uri Uri, byte[] EncodedData, string ContentType, params KeyValuePair< string, string >[] Headers)
 Posts to a resource, using a Uniform Resource Identifier (or Locator). More...
 
static Task< ContentBinaryResponsePostAsync (Uri Uri, byte[] EncodedData, string ContentType, X509Certificate Certificate, params KeyValuePair< string, string >[] Headers)
 Posts to a resource, using a Uniform Resource Identifier (or Locator). More...
 
static Task< ContentBinaryResponsePostAsync (Uri Uri, byte[] EncodedData, string ContentType, X509Certificate Certificate, EventHandler< RemoteCertificateEventArgs > RemoteCertificateValidator, params KeyValuePair< string, string >[] Headers)
 Posts to a resource, using a Uniform Resource Identifier (or Locator). More...
 
static Task< ContentBinaryResponsePostAsync (Uri Uri, byte[] EncodedData, string ContentType, int TimeoutMs, params KeyValuePair< string, string >[] Headers)
 Posts to a resource, using a Uniform Resource Identifier (or Locator). More...
 
static Task< ContentBinaryResponsePostAsync (Uri Uri, byte[] EncodedData, string ContentType, X509Certificate Certificate, int TimeoutMs, params KeyValuePair< string, string >[] Headers)
 Posts to a resource, using a Uniform Resource Identifier (or Locator). More...
 
static Task< ContentBinaryResponsePostAsync (Uri Uri, byte[] EncodedData, string ContentType, X509Certificate Certificate, EventHandler< RemoteCertificateEventArgs > RemoteCertificateValidator, int TimeoutMs, params KeyValuePair< string, string >[] Headers)
 Posts to a resource, using a Uniform Resource Identifier (or Locator). More...
 
static bool CanPut (Uri Uri, out Grade Grade, out IContentPutter Putter)
 If a resource can be put to, given its URI. More...
 
static Task< ContentResponsePutAsync (Uri Uri, object Data, params KeyValuePair< string, string >[] Headers)
 Puts to a resource, using a Uniform Resource Identifier (or Locator). More...
 
static Task< ContentResponsePutAsync (Uri Uri, object Data, X509Certificate Certificate, params KeyValuePair< string, string >[] Headers)
 Puts to a resource, using a Uniform Resource Identifier (or Locator). More...
 
static Task< ContentResponsePutAsync (Uri Uri, object Data, X509Certificate Certificate, EventHandler< RemoteCertificateEventArgs > RemoteCertificateValidator, params KeyValuePair< string, string >[] Headers)
 Puts to a resource, using a Uniform Resource Identifier (or Locator). More...
 
static Task< ContentResponsePutAsync (Uri Uri, object Data, int TimeoutMs, params KeyValuePair< string, string >[] Headers)
 Puts to a resource, using a Uniform Resource Identifier (or Locator). More...
 
static Task< ContentResponsePutAsync (Uri Uri, object Data, X509Certificate Certificate, int TimeoutMs, params KeyValuePair< string, string >[] Headers)
 Puts to a resource, using a Uniform Resource Identifier (or Locator). More...
 
static Task< ContentResponsePutAsync (Uri Uri, object Data, X509Certificate Certificate, EventHandler< RemoteCertificateEventArgs > RemoteCertificateValidator, int TimeoutMs, params KeyValuePair< string, string >[] Headers)
 Puts to a resource, using a Uniform Resource Identifier (or Locator). More...
 
static Task< ContentBinaryResponsePutAsync (Uri Uri, byte[] EncodedData, string ContentType, params KeyValuePair< string, string >[] Headers)
 Puts to a resource, using a Uniform Resource Identifier (or Locator). More...
 
static Task< ContentBinaryResponsePutAsync (Uri Uri, byte[] EncodedData, string ContentType, X509Certificate Certificate, params KeyValuePair< string, string >[] Headers)
 Puts to a resource, using a Uniform Resource Identifier (or Locator). More...
 
static Task< ContentBinaryResponsePutAsync (Uri Uri, byte[] EncodedData, string ContentType, X509Certificate Certificate, EventHandler< RemoteCertificateEventArgs > RemoteCertificateValidator, params KeyValuePair< string, string >[] Headers)
 Puts to a resource, using a Uniform Resource Identifier (or Locator). More...
 
static Task< ContentBinaryResponsePutAsync (Uri Uri, byte[] EncodedData, string ContentType, int TimeoutMs, params KeyValuePair< string, string >[] Headers)
 Puts to a resource, using a Uniform Resource Identifier (or Locator). More...
 
static Task< ContentBinaryResponsePutAsync (Uri Uri, byte[] EncodedData, string ContentType, X509Certificate Certificate, int TimeoutMs, params KeyValuePair< string, string >[] Headers)
 Puts to a resource, using a Uniform Resource Identifier (or Locator). More...
 
static Task< ContentBinaryResponsePutAsync (Uri Uri, byte[] EncodedData, string ContentType, X509Certificate Certificate, EventHandler< RemoteCertificateEventArgs > RemoteCertificateValidator, int TimeoutMs, params KeyValuePair< string, string >[] Headers)
 Puts to a resource, using a Uniform Resource Identifier (or Locator). More...
 
static bool CanDelete (Uri Uri, out Grade Grade, out IContentDeleter Deleter)
 If a resource can be deleted to, given its URI. More...
 
static Task< ContentResponseDeleteAsync (Uri Uri, params KeyValuePair< string, string >[] Headers)
 Deletes a resource, using a Uniform Resource Identifier (or Locator). More...
 
static Task< ContentResponseDeleteAsync (Uri Uri, X509Certificate Certificate, params KeyValuePair< string, string >[] Headers)
 Deletes a resource, using a Uniform Resource Identifier (or Locator). More...
 
static Task< ContentResponseDeleteAsync (Uri Uri, X509Certificate Certificate, EventHandler< RemoteCertificateEventArgs > RemoteCertificateValidator, params KeyValuePair< string, string >[] Headers)
 Deletes a resource, using a Uniform Resource Identifier (or Locator). More...
 
static Task< ContentResponseDeleteAsync (Uri Uri, int TimeoutMs, params KeyValuePair< string, string >[] Headers)
 Deletes a resource, using a Uniform Resource Identifier (or Locator). More...
 
static Task< ContentResponseDeleteAsync (Uri Uri, X509Certificate Certificate, int TimeoutMs, params KeyValuePair< string, string >[] Headers)
 Deletes a resource, using a Uniform Resource Identifier (or Locator). More...
 
static Task< ContentResponseDeleteAsync (Uri Uri, X509Certificate Certificate, EventHandler< RemoteCertificateEventArgs > RemoteCertificateValidator, int TimeoutMs, params KeyValuePair< string, string >[] Headers)
 Deletes a resource, using a Uniform Resource Identifier (or Locator). More...
 
static bool CanHead (Uri Uri, out Grade Grade, out IContentHeader Header)
 If the headers of a resource can be gotten, given its URI. More...
 
static Task< ContentResponseHeadAsync (Uri Uri, params KeyValuePair< string, string >[] Headers)
 Heads a resource, given its URI. More...
 
static Task< ContentResponseHeadAsync (Uri Uri, X509Certificate Certificate, params KeyValuePair< string, string >[] Headers)
 Heads a resource, given its URI. More...
 
static Task< ContentResponseHeadAsync (Uri Uri, X509Certificate Certificate, EventHandler< RemoteCertificateEventArgs > RemoteCertificateValidator, params KeyValuePair< string, string >[] Headers)
 Heads a resource, given its URI. More...
 
static Task< ContentResponseHeadAsync (Uri Uri, int TimeoutMs, params KeyValuePair< string, string >[] Headers)
 Heads a resource, given its URI. More...
 
static Task< ContentResponseHeadAsync (Uri Uri, X509Certificate Certificate, int TimeoutMs, params KeyValuePair< string, string >[] Headers)
 Heads a resource, given its URI. More...
 
static Task< ContentResponseHeadAsync (Uri Uri, X509Certificate Certificate, EventHandler< RemoteCertificateEventArgs > RemoteCertificateValidator, int TimeoutMs, params KeyValuePair< string, string >[] Headers)
 Heads a resource, given its URI. More...
 
static bool CanQuery (Uri Uri, out Grade Grade, out IContentQuery Query)
 If a resource can be queried, given its URI. More...
 
static Task< ContentResponseQueryAsync (Uri Uri, object Data, params KeyValuePair< string, string >[] Headers)
 Queries a resource, using a Uniform Resource Identifier (or Locator). More...
 
static Task< ContentResponseQueryAsync (Uri Uri, object Data, X509Certificate Certificate, params KeyValuePair< string, string >[] Headers)
 Queries a resource, using a Uniform Resource Identifier (or Locator). More...
 
static Task< ContentResponseQueryAsync (Uri Uri, object Data, X509Certificate Certificate, EventHandler< RemoteCertificateEventArgs > RemoteCertificateValidator, params KeyValuePair< string, string >[] Headers)
 Queries a resource, using a Uniform Resource Identifier (or Locator). More...
 
static Task< ContentResponseQueryAsync (Uri Uri, object Data, int TimeoutMs, params KeyValuePair< string, string >[] Headers)
 Queries a resource, using a Uniform Resource Identifier (or Locator). More...
 
static Task< ContentResponseQueryAsync (Uri Uri, object Data, X509Certificate Certificate, int TimeoutMs, params KeyValuePair< string, string >[] Headers)
 Queries a resource, using a Uniform Resource Identifier (or Locator). More...
 
static Task< ContentResponseQueryAsync (Uri Uri, object Data, X509Certificate Certificate, EventHandler< RemoteCertificateEventArgs > RemoteCertificateValidator, int TimeoutMs, params KeyValuePair< string, string >[] Headers)
 Queries a resource, using a Uniform Resource Identifier (or Locator). More...
 
static Task< ContentBinaryResponseQueryAsync (Uri Uri, byte[] EncodedData, string ContentType, params KeyValuePair< string, string >[] Headers)
 Queries a resource, using a Uniform Resource Identifier (or Locator). More...
 
static Task< ContentBinaryResponseQueryAsync (Uri Uri, byte[] EncodedData, string ContentType, X509Certificate Certificate, params KeyValuePair< string, string >[] Headers)
 Queries a resource, using a Uniform Resource Identifier (or Locator). More...
 
static Task< ContentBinaryResponseQueryAsync (Uri Uri, byte[] EncodedData, string ContentType, X509Certificate Certificate, EventHandler< RemoteCertificateEventArgs > RemoteCertificateValidator, params KeyValuePair< string, string >[] Headers)
 Queries a resource, using a Uniform Resource Identifier (or Locator). More...
 
static Task< ContentBinaryResponseQueryAsync (Uri Uri, byte[] EncodedData, string ContentType, int TimeoutMs, params KeyValuePair< string, string >[] Headers)
 Queries a resource, using a Uniform Resource Identifier (or Locator). More...
 
static Task< ContentBinaryResponseQueryAsync (Uri Uri, byte[] EncodedData, string ContentType, X509Certificate Certificate, int TimeoutMs, params KeyValuePair< string, string >[] Headers)
 Queries a resource, using a Uniform Resource Identifier (or Locator). More...
 
static Task< ContentBinaryResponseQueryAsync (Uri Uri, byte[] EncodedData, string ContentType, X509Certificate Certificate, EventHandler< RemoteCertificateEventArgs > RemoteCertificateValidator, int TimeoutMs, params KeyValuePair< string, string >[] Headers)
 Queries a resource, using a Uniform Resource Identifier (or Locator). More...
 
static bool IsLocalDomain (string DomainOrHost, bool IncludeAlternativeDomains)
 Checks if a domain or nost name is local. More...
 

Static Public Attributes

static readonly Encoding ISO_8859_1 = Encoding.GetEncoding("ISO-8859-1")
 ISO-8859-1 character encoding. More...
 

Properties

static int DefaultTimeout [get]
 Default timeout of internet access methods, in milliseconds. More...
 
static string[] CanEncodeContentTypes [get]
 Internet content types that can be encoded. More...
 
static string[] CanEncodeFileExtensions [get]
 File extensions that can be encoded. More...
 
static IContentEncoder[] Encoders [get]
 Available Internet Content Encoders. More...
 
static string[] CanDecodeContentTypes [get]
 Internet content types that can be decoded. More...
 
static string[] CanDecodeFileExtensions [get]
 File extensions that can be decoded. More...
 
static IContentDecoder[] Decoders [get]
 Available Internet Content Decoders. More...
 
static IContentConverter[] Converters [get]
 Available Internet Content Converters. More...
 
static string[] CanGetUriSchemes [get]
 Internet URI Schemes that can be gotten. More...
 
static IContentGetter[] Getters [get]
 Available Internet Content Getters. More...
 
static string[] CanPostToUriSchemes [get]
 Internet URI Schemes that can be posted to. More...
 
static IContentPoster[] Posters [get]
 Available Internet Content Posters. More...
 
static string[] CanPutToUriSchemes [get]
 Internet URI Schemes that can be put to. More...
 
static IContentPutter[] Putters [get]
 Available Internet Content Putters. More...
 
static string[] CanDeleteToUriSchemes [get]
 Internet URI Schemes that can be deleted to. More...
 
static IContentDeleter[] Deleters [get]
 Available Internet Content Deleters. More...
 
static string[] CanHeadUriSchemes [get]
 Internet URI Schemes where it is possible to get headers. More...
 
static IContentHeader[] Headers [get]
 Available Internet Content Header-retrievers. More...
 
static string[] CanQueryToUriSchemes [get]
 Internet URI Schemes that can be queried. More...
 
static IContentQuery[] Queries [get]
 Available Internet Content Queries. More...
 

Events

static EventHandler< LocalDomainEventArgsLocalDomainCheck = null
 Event raised when a local domain is to be checked. More...
 

Detailed Description

Static class managing encoding and decoding of internet content.

Definition at line 18 of file InternetContent.cs.

Member Function Documentation

◆ CanConvert()

static bool Waher.Content.InternetContent.CanConvert ( string  FromContentType,
string  ToContentType,
out IContentConverter  Converter 
)
static

Checks if it is possible to convert content from one type to another.

A shortest path algorithm maximizing conversion quality and shortening conversion distance is used to find sequences of converters, if a direct conversion is not possible.

Parameters
FromContentTypeExisting content type.
ToContentTypeDesired content type.
ConverterConverter that transforms content from type FromContentType to type ToContentType .
Returns
If a converter was found.

Definition at line 913 of file InternetContent.cs.

◆ CanDelete()

static bool Waher.Content.InternetContent.CanDelete ( Uri  Uri,
out Grade  Grade,
out IContentDeleter  Deleter 
)
static

If a resource can be deleted to, given its URI.

Parameters
UriURI of resource.
GradeHow well the deleted can delete to the resource.
DeleterBest deleter for the URI.
Returns
If a resource with the given URI can be deleted to.

Definition at line 2238 of file InternetContent.cs.

◆ CanGet()

static bool Waher.Content.InternetContent.CanGet ( Uri  Uri,
out Grade  Grade,
out IContentGetter  Getter 
)
static

If a resource can be gotten, given its URI.

Parameters
UriURI of resource.
GradeHow well the getter can get the resource.
GetterBest getter for the URI.
Returns
If a resource with the given URI can be gotten.

Definition at line 1202 of file InternetContent.cs.

◆ CanHead()

static bool Waher.Content.InternetContent.CanHead ( Uri  Uri,
out Grade  Grade,
out IContentHeader  Header 
)
static

If the headers of a resource can be gotten, given its URI.

Parameters
UriURI of resource.
GradeHow well the headers of the resource can be retrieved.
HeaderBest header-retriever for the URI.
Returns
If the headers of a resource with the given URI can be retrieved.

Definition at line 2458 of file InternetContent.cs.

◆ CanPost()

static bool Waher.Content.InternetContent.CanPost ( Uri  Uri,
out Grade  Grade,
out IContentPoster  Poster 
)
static

If a resource can be posted to, given its URI.

Parameters
UriURI of resource.
GradeHow well the posted can post to the resource.
PosterBest poster for the URI.
Returns
If a resource with the given URI can be posted to.

Definition at line 1595 of file InternetContent.cs.

◆ CanPut()

static bool Waher.Content.InternetContent.CanPut ( Uri  Uri,
out Grade  Grade,
out IContentPutter  Putter 
)
static

If a resource can be put to, given its URI.

Parameters
UriURI of resource.
GradeHow well the putted can put to the resource.
PutterBest putter for the URI.
Returns
If a resource with the given URI can be put to.

Definition at line 1918 of file InternetContent.cs.

◆ CanQuery()

static bool Waher.Content.InternetContent.CanQuery ( Uri  Uri,
out Grade  Grade,
out IContentQuery  Query 
)
static

If a resource can be queried, given its URI.

Parameters
UriURI of resource.
GradeHow well the queried can query to the resource.
QueryBest queryter for the URI.
Returns
If a resource with the given URI can be queried.

Definition at line 2677 of file InternetContent.cs.

◆ Decode() [1/2]

static ContentResponse Waher.Content.InternetContent.Decode ( string  ContentType,
byte[]  Data,
Encoding  Encoding,
KeyValuePair< string, string >[]  Fields,
Uri  BaseUri 
)
static

Decodes an object.

Parameters
ContentTypeInternet Content Type.
DataEncoded object.
EncodingAny encoding specified. Can be null if no encoding specified.
FieldsAny content-type related fields and their corresponding values.
BaseUriBase URI, if any. If not available, value is null.
Returns
Decoded object.

Definition at line 585 of file InternetContent.cs.

◆ Decode() [2/2]

static ContentResponse Waher.Content.InternetContent.Decode ( string  ContentType,
byte[]  Data,
Uri  BaseUri 
)
static

Decodes an object.

Parameters
ContentTypeInternet Content Type.
DataEncoded object.
BaseUriBase URI, if any. If not available, value is null.
Returns
Decoded object.

Definition at line 644 of file InternetContent.cs.

◆ DecodeAsync() [1/4]

static Task< ContentResponse > Waher.Content.InternetContent.DecodeAsync ( string  ContentType,
byte[]  Data,
Encoding  Encoding,
KeyValuePair< string, string >[]  Fields,
Uri  BaseUri 
)
static

Decodes an object.

Parameters
ContentTypeInternet Content Type.
DataEncoded object.
EncodingAny encoding specified. Can be null if no encoding specified.
FieldsAny content-type related fields and their corresponding values.
BaseUriBase URI, if any. If not available, value is null.
Returns
Decoded object.

Definition at line 599 of file InternetContent.cs.

◆ DecodeAsync() [2/4]

static Task< ContentResponse > Waher.Content.InternetContent.DecodeAsync ( string  ContentType,
byte[]  Data,
Encoding  Encoding,
KeyValuePair< string, string >[]  Fields,
Uri  BaseUri,
ICodecProgress  Progress 
)
static

Decodes an object.

Parameters
ContentTypeInternet Content Type.
DataEncoded object.
EncodingAny encoding specified. Can be null if no encoding specified.
FieldsAny content-type related fields and their corresponding values.
BaseUriBase URI, if any. If not available, value is null.
ProgressOptional progress reporting of encoding/decoding. Can be null.
Returns
Decoded object.

Definition at line 614 of file InternetContent.cs.

◆ DecodeAsync() [3/4]

static Task< ContentResponse > Waher.Content.InternetContent.DecodeAsync ( string  ContentType,
byte[]  Data,
Uri  BaseUri 
)
static

Decodes an object.

Parameters
ContentTypeInternet Content Type.
DataEncoded object.
BaseUriBase URI, if any. If not available, value is null.
Returns
Decoded object.

Definition at line 656 of file InternetContent.cs.

◆ DecodeAsync() [4/4]

static Task< ContentResponse > Waher.Content.InternetContent.DecodeAsync ( string  ContentType,
byte[]  Data,
Uri  BaseUri,
ICodecProgress  Progress 
)
static

Decodes an object.

Parameters
ContentTypeInternet Content Type.
DataEncoded object.
BaseUriBase URI, if any. If not available, value is null.
ProgressOptional progress reporting of encoding/decoding. Can be null.
Returns
Decoded object.

Definition at line 669 of file InternetContent.cs.

◆ Decodes()

static bool Waher.Content.InternetContent.Decodes ( string  ContentType,
out Grade  Grade,
out IContentDecoder  Decoder 
)
static

If an object with a given content type can be decoded.

Parameters
ContentTypeContent type to decode.
GradeHow well the decoder decodes the object.
DecoderBest decoder for the object.
Returns
If an object with the given type can be decoded.

Definition at line 542 of file InternetContent.cs.

◆ DeleteAsync() [1/6]

static Task< ContentResponse > Waher.Content.InternetContent.DeleteAsync ( Uri  Uri,
int  TimeoutMs,
params KeyValuePair< string, string >[]  Headers 
)
static

Deletes a resource, using a Uniform Resource Identifier (or Locator).

Parameters
UriURI
TimeoutMsTimeout, in milliseconds. (Default=InternetContent.DefaultTimeout)
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Decoded response.

Definition at line 2324 of file InternetContent.cs.

◆ DeleteAsync() [2/6]

static Task< ContentResponse > Waher.Content.InternetContent.DeleteAsync ( Uri  Uri,
params KeyValuePair< string, string >[]  Headers 
)
static

Deletes a resource, using a Uniform Resource Identifier (or Locator).

Parameters
UriURI
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Decoded response.

Definition at line 2283 of file InternetContent.cs.

◆ DeleteAsync() [3/6]

static Task< ContentResponse > Waher.Content.InternetContent.DeleteAsync ( Uri  Uri,
X509Certificate  Certificate,
EventHandler< RemoteCertificateEventArgs RemoteCertificateValidator,
int  TimeoutMs,
params KeyValuePair< string, string >[]  Headers 
)
static

Deletes a resource, using a Uniform Resource Identifier (or Locator).

Parameters
UriURI
CertificateOptional client certificate to use in a Mutual TLS session.
RemoteCertificateValidatorOptional validator of remote certificates.
TimeoutMsTimeout, in milliseconds. (Default=InternetContent.DefaultTimeout)
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Decoded response.

Definition at line 2351 of file InternetContent.cs.

◆ DeleteAsync() [4/6]

static Task< ContentResponse > Waher.Content.InternetContent.DeleteAsync ( Uri  Uri,
X509Certificate  Certificate,
EventHandler< RemoteCertificateEventArgs RemoteCertificateValidator,
params KeyValuePair< string, string >[]  Headers 
)
static

Deletes a resource, using a Uniform Resource Identifier (or Locator).

Parameters
UriURI
CertificateOptional client certificate to use in a Mutual TLS session.
RemoteCertificateValidatorOptional validator of remote certificates.
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Decoded response.

Definition at line 2308 of file InternetContent.cs.

◆ DeleteAsync() [5/6]

static Task< ContentResponse > Waher.Content.InternetContent.DeleteAsync ( Uri  Uri,
X509Certificate  Certificate,
int  TimeoutMs,
params KeyValuePair< string, string >[]  Headers 
)
static

Deletes a resource, using a Uniform Resource Identifier (or Locator).

Parameters
UriURI
CertificateOptional client certificate to use in a Mutual TLS session.
TimeoutMsTimeout, in milliseconds. (Default=InternetContent.DefaultTimeout)
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Decoded response.

Definition at line 2337 of file InternetContent.cs.

◆ DeleteAsync() [6/6]

static Task< ContentResponse > Waher.Content.InternetContent.DeleteAsync ( Uri  Uri,
X509Certificate  Certificate,
params KeyValuePair< string, string >[]  Headers 
)
static

Deletes a resource, using a Uniform Resource Identifier (or Locator).

Parameters
UriURI
CertificateOptional client certificate to use in a Mutual TLS session.
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Decoded response.

Definition at line 2295 of file InternetContent.cs.

◆ Encode()

static ContentResponse Waher.Content.InternetContent.Encode ( object  Object,
Encoding  Encoding,
params string[]  AcceptedContentTypes 
)
static

Encodes an object.

Parameters
ObjectObject to encode.
EncodingDesired encoding of text. Can be null if no desired encoding is speified.
AcceptedContentTypesOptional array of accepted content types. If array is empty, all content types are accepted.
Returns
Encoded object.

Definition at line 349 of file InternetContent.cs.

◆ EncodeAsync() [1/2]

static Task< ContentResponse > Waher.Content.InternetContent.EncodeAsync ( object  Object,
Encoding  Encoding,
ICodecProgress  Progress,
params string[]  AcceptedContentTypes 
)
static

Encodes an object.

Parameters
ObjectObject to encode.
EncodingDesired encoding of text. Can be null if no desired encoding is speified.
ProgressOptional progress reporting of encoding/decoding. Can be null.
AcceptedContentTypesOptional array of accepted content types. If array is empty, all content types are accepted.
Returns
Encoded object, and Content Type of encoding. Includes information about any text encodings used.

Definition at line 374 of file InternetContent.cs.

◆ EncodeAsync() [2/2]

static Task< ContentResponse > Waher.Content.InternetContent.EncodeAsync ( object  Object,
Encoding  Encoding,
params string[]  AcceptedContentTypes 
)
static

Encodes an object.

Parameters
ObjectObject to encode.
EncodingDesired encoding of text. Can be null if no desired encoding is speified.
AcceptedContentTypesOptional array of accepted content types. If array is empty, all content types are accepted.
Returns
Encoded object, and Content Type of encoding. Includes information about any text encodings used.

Definition at line 361 of file InternetContent.cs.

◆ Encodes()

static bool Waher.Content.InternetContent.Encodes ( object  Object,
out Grade  Grade,
out IContentEncoder  Encoder,
params string[]  AcceptedContentTypes 
)
static

If a given object can be encoded.

Parameters
ObjectObject to encode.
GradeHow well the object can be encoded.
EncoderBest encoder for the object.
AcceptedContentTypesOptional array of accepted content types. If array is empty, all content types are accepted.
Returns
If the object can be encoded.

Definition at line 264 of file InternetContent.cs.

◆ GetAsync() [1/6]

static Task< ContentResponse > Waher.Content.InternetContent.GetAsync ( Uri  Uri,
int  TimeoutMs,
params KeyValuePair< string, string >[]  Headers 
)
static

Gets a resource, given its URI.

Parameters
UriUniform resource identifier.
TimeoutMsTimeout, in milliseconds. (Default=InternetContent.DefaultTimeout)
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Object.

Definition at line 1288 of file InternetContent.cs.

◆ GetAsync() [2/6]

static Task< ContentResponse > Waher.Content.InternetContent.GetAsync ( Uri  Uri,
params KeyValuePair< string, string >[]  Headers 
)
static

Gets a resource, given its URI.

Parameters
UriUniform resource identifier.
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Object.

Definition at line 1247 of file InternetContent.cs.

◆ GetAsync() [3/6]

static Task< ContentResponse > Waher.Content.InternetContent.GetAsync ( Uri  Uri,
X509Certificate  Certificate,
EventHandler< RemoteCertificateEventArgs RemoteCertificateValidator,
int  TimeoutMs,
params KeyValuePair< string, string >[]  Headers 
)
static

Gets a resource, given its URI.

Parameters
UriUniform resource identifier.
CertificateOptional client certificate to use in a Mutual TLS session.
RemoteCertificateValidatorOptional validator of remote certificates.
TimeoutMsTimeout, in milliseconds. (Default=InternetContent.DefaultTimeout)
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Object.

Definition at line 1315 of file InternetContent.cs.

◆ GetAsync() [4/6]

static Task< ContentResponse > Waher.Content.InternetContent.GetAsync ( Uri  Uri,
X509Certificate  Certificate,
EventHandler< RemoteCertificateEventArgs RemoteCertificateValidator,
params KeyValuePair< string, string >[]  Headers 
)
static

Gets a resource, given its URI.

Parameters
UriUniform resource identifier.
CertificateOptional client certificate to use in a Mutual TLS session.
RemoteCertificateValidatorOptional validator of remote certificates.
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Object.

Definition at line 1272 of file InternetContent.cs.

◆ GetAsync() [5/6]

static Task< ContentResponse > Waher.Content.InternetContent.GetAsync ( Uri  Uri,
X509Certificate  Certificate,
int  TimeoutMs,
params KeyValuePair< string, string >[]  Headers 
)
static

Gets a resource, given its URI.

Parameters
UriUniform resource identifier.
CertificateOptional client certificate to use in a Mutual TLS session.
TimeoutMsTimeout, in milliseconds. (Default=InternetContent.DefaultTimeout)
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Object.

Definition at line 1301 of file InternetContent.cs.

◆ GetAsync() [6/6]

static Task< ContentResponse > Waher.Content.InternetContent.GetAsync ( Uri  Uri,
X509Certificate  Certificate,
params KeyValuePair< string, string >[]  Headers 
)
static

Gets a resource, given its URI.

Parameters
UriUniform resource identifier.
CertificateOptional client certificate to use in a Mutual TLS session.
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Object.

Definition at line 1259 of file InternetContent.cs.

◆ GetContentType()

static string Waher.Content.InternetContent.GetContentType ( string  FileExtension)
static

Gets the content type of an item, given its file extension. It uses the TryGetContentType to see if any of the content encoders/decoders support content with the corresponding file type. If no such encoder/decoder is found, the generic application/octet-stream type is returned.

Parameters
FileExtensionFile extension.
Returns
Content type.

Definition at line 768 of file InternetContent.cs.

◆ GetConverters()

static IContentConverter[] Waher.Content.InternetContent.GetConverters ( string  FromContentType)
static

Gets available converters that can convert content from a given type.

Parameters
FromContentTypeFrom which content type converters have to convert.
Returns
Available converters, or null if there are none.

Definition at line 1091 of file InternetContent.cs.

◆ GetEncoding()

static Encoding Waher.Content.InternetContent.GetEncoding ( string  CharacterSet)
static

Gets a character encoding from its name.

Parameters
CharacterSetName of character set.
Returns
Encoding.

Definition at line 722 of file InternetContent.cs.

◆ GetFileExtension()

static string Waher.Content.InternetContent.GetFileExtension ( string  ContentType)
static

Gets the file extension of an item, given its content type. It uses the TryGetFileExtension to see if any of the content encoders/decoders support content with the corresponding content type. If no such encoder/decoder is found, the generic bin extension is returned.

Parameters
ContentTypeFile Content-Type.
Returns
File extension.

Definition at line 830 of file InternetContent.cs.

◆ GetTempStreamAsync() [1/12]

static Task< ContentStreamResponse > Waher.Content.InternetContent.GetTempStreamAsync ( Uri  Uri,
int  TimeoutMs,
params KeyValuePair< string, string >[]  Headers 
)
static

Gets a (possibly big) resource, given its URI.

Parameters
UriUniform resource identifier.
TimeoutMsTimeout, in milliseconds. (Default=InternetContent.DefaultTimeout)
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Content-Type, together with a Temporary file, if resource has been downloaded, or null if resource is data-less.

Definition at line 1414 of file InternetContent.cs.

◆ GetTempStreamAsync() [2/12]

static Task< ContentStreamResponse > Waher.Content.InternetContent.GetTempStreamAsync ( Uri  Uri,
int  TimeoutMs,
TemporaryStream  Destination,
params KeyValuePair< string, string >[]  Headers 
)
static

Gets a (possibly big) resource, given its URI.

Parameters
UriUniform resource identifier.
TimeoutMsTimeout, in milliseconds. (Default=InternetContent.DefaultTimeout)
DestinationOptional destination. Content will be output to this stream. If not provided, a new temporary stream will be created.
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Content-Type, together with a Temporary file, if resource has been downloaded, or null if resource is data-less.

Definition at line 1427 of file InternetContent.cs.

◆ GetTempStreamAsync() [3/12]

static Task< ContentStreamResponse > Waher.Content.InternetContent.GetTempStreamAsync ( Uri  Uri,
params KeyValuePair< string, string >[]  Headers 
)
static

Gets a (possibly big) resource, given its URI.

Parameters
UriUniform resource identifier.
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Content-Type, together with a Temporary file, if resource has been downloaded, or null if resource is data-less.

Definition at line 1330 of file InternetContent.cs.

◆ GetTempStreamAsync() [4/12]

static Task< ContentStreamResponse > Waher.Content.InternetContent.GetTempStreamAsync ( Uri  Uri,
TemporaryStream  Destination,
params KeyValuePair< string, string >[]  Headers 
)
static

Gets a (possibly big) resource, given its URI.

Parameters
UriUniform resource identifier.
DestinationOptional destination. Content will be output to this stream. If not provided, a new temporary stream will be created.
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Content-Type, together with a Temporary file, if resource has been downloaded, or null if resource is data-less.

Definition at line 1342 of file InternetContent.cs.

◆ GetTempStreamAsync() [5/12]

static Task< ContentStreamResponse > Waher.Content.InternetContent.GetTempStreamAsync ( Uri  Uri,
X509Certificate  Certificate,
EventHandler< RemoteCertificateEventArgs RemoteCertificateValidator,
int  TimeoutMs,
params KeyValuePair< string, string >[]  Headers 
)
static

Gets a (possibly big) resource, given its URI.

Parameters
UriUniform resource identifier.
CertificateOptional client certificate to use in a Mutual TLS session.
RemoteCertificateValidatorOptional validator of remote certificates.
TimeoutMsTimeout, in milliseconds. (Default=InternetContent.DefaultTimeout)
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Content-Type, together with a Temporary file, if resource has been downloaded, or null if resource is data-less.

Definition at line 1469 of file InternetContent.cs.

◆ GetTempStreamAsync() [6/12]

static Task< ContentStreamResponse > Waher.Content.InternetContent.GetTempStreamAsync ( Uri  Uri,
X509Certificate  Certificate,
EventHandler< RemoteCertificateEventArgs RemoteCertificateValidator,
int  TimeoutMs,
TemporaryStream  Destination,
params KeyValuePair< string, string >[]  Headers 
)
static

Gets a (possibly big) resource, given its URI.

Parameters
UriUniform resource identifier.
CertificateOptional client certificate to use in a Mutual TLS session.
RemoteCertificateValidatorOptional validator of remote certificates.
TimeoutMsTimeout, in milliseconds. (Default=InternetContent.DefaultTimeout)
DestinationOptional destination. Content will be output to this stream. If not provided, a new temporary stream will be created.
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Content-Type, together with a Temporary file, if resource has been downloaded, or null if resource is data-less.

Definition at line 1488 of file InternetContent.cs.

◆ GetTempStreamAsync() [7/12]

static Task< ContentStreamResponse > Waher.Content.InternetContent.GetTempStreamAsync ( Uri  Uri,
X509Certificate  Certificate,
EventHandler< RemoteCertificateEventArgs RemoteCertificateValidator,
params KeyValuePair< string, string >[]  Headers 
)
static

Gets a (possibly big) resource, given its URI.

Parameters
UriUniform resource identifier.
CertificateOptional client certificate to use in a Mutual TLS session.
RemoteCertificateValidatorOptional validator of remote certificates.
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Content-Type, together with a Temporary file, if resource has been downloaded, or null if resource is data-less.

Definition at line 1380 of file InternetContent.cs.

◆ GetTempStreamAsync() [8/12]

static Task< ContentStreamResponse > Waher.Content.InternetContent.GetTempStreamAsync ( Uri  Uri,
X509Certificate  Certificate,
EventHandler< RemoteCertificateEventArgs RemoteCertificateValidator,
TemporaryStream  Destination,
params KeyValuePair< string, string >[]  Headers 
)
static

Gets a (possibly big) resource, given its URI.

Parameters
UriUniform resource identifier.
CertificateOptional client certificate to use in a Mutual TLS session.
RemoteCertificateValidatorOptional validator of remote certificates.
DestinationOptional destination. Content will be output to this stream. If not provided, a new temporary stream will be created.
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Content-Type, together with a Temporary file, if resource has been downloaded, or null if resource is data-less.

Definition at line 1398 of file InternetContent.cs.

◆ GetTempStreamAsync() [9/12]

static Task< ContentStreamResponse > Waher.Content.InternetContent.GetTempStreamAsync ( Uri  Uri,
X509Certificate  Certificate,
int  TimeoutMs,
params KeyValuePair< string, string >[]  Headers 
)
static

Gets a (possibly big) resource, given its URI.

Parameters
UriUniform resource identifier.
CertificateOptional client certificate to use in a Mutual TLS session.
TimeoutMsTimeout, in milliseconds. (Default=InternetContent.DefaultTimeout)
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Content-Type, together with a Temporary file, if resource has been downloaded, or null if resource is data-less.

Definition at line 1440 of file InternetContent.cs.

◆ GetTempStreamAsync() [10/12]

static Task< ContentStreamResponse > Waher.Content.InternetContent.GetTempStreamAsync ( Uri  Uri,
X509Certificate  Certificate,
int  TimeoutMs,
TemporaryStream  Destination,
params KeyValuePair< string, string >[]  Headers 
)
static

Gets a (possibly big) resource, given its URI.

Parameters
UriUniform resource identifier.
CertificateOptional client certificate to use in a Mutual TLS session.
TimeoutMsTimeout, in milliseconds. (Default=InternetContent.DefaultTimeout)
DestinationOptional destination. Content will be output to this stream. If not provided, a new temporary stream will be created.
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Content-Type, together with a Temporary file, if resource has been downloaded, or null if resource is data-less.

Definition at line 1454 of file InternetContent.cs.

◆ GetTempStreamAsync() [11/12]

static Task< ContentStreamResponse > Waher.Content.InternetContent.GetTempStreamAsync ( Uri  Uri,
X509Certificate  Certificate,
params KeyValuePair< string, string >[]  Headers 
)
static

Gets a (possibly big) resource, given its URI.

Parameters
UriUniform resource identifier.
CertificateOptional client certificate to use in a Mutual TLS session.
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Content-Type, together with a Temporary file, if resource has been downloaded, or null if resource is data-less.

Definition at line 1354 of file InternetContent.cs.

◆ GetTempStreamAsync() [12/12]

static Task< ContentStreamResponse > Waher.Content.InternetContent.GetTempStreamAsync ( Uri  Uri,
X509Certificate  Certificate,
TemporaryStream  Destination,
params KeyValuePair< string, string >[]  Headers 
)
static

Gets a (possibly big) resource, given its URI.

Parameters
UriUniform resource identifier.
CertificateOptional client certificate to use in a Mutual TLS session.
DestinationOptional destination. Content will be output to this stream. If not provided, a new temporary stream will be created.
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Content-Type, together with a Temporary file, if resource has been downloaded, or null if resource is data-less.

Definition at line 1367 of file InternetContent.cs.

◆ HeadAsync() [1/6]

static Task< ContentResponse > Waher.Content.InternetContent.HeadAsync ( Uri  Uri,
int  TimeoutMs,
params KeyValuePair< string, string >[]  Headers 
)
static

Heads a resource, given its URI.

Parameters
UriUniform resource identifier.
TimeoutMsTimeout, in milliseconds. (Default=InternetContent.DefaultTimeout)
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Object.

Definition at line 2544 of file InternetContent.cs.

◆ HeadAsync() [2/6]

static Task< ContentResponse > Waher.Content.InternetContent.HeadAsync ( Uri  Uri,
params KeyValuePair< string, string >[]  Headers 
)
static

Heads a resource, given its URI.

Parameters
UriUniform resource identifier.
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Object.

Definition at line 2503 of file InternetContent.cs.

◆ HeadAsync() [3/6]

static Task< ContentResponse > Waher.Content.InternetContent.HeadAsync ( Uri  Uri,
X509Certificate  Certificate,
EventHandler< RemoteCertificateEventArgs RemoteCertificateValidator,
int  TimeoutMs,
params KeyValuePair< string, string >[]  Headers 
)
static

Heads a resource, given its URI.

Parameters
UriUniform resource identifier.
CertificateOptional client certificate to use in a Mutual TLS session.
RemoteCertificateValidatorOptional validator of remote certificates.
TimeoutMsTimeout, in milliseconds. (Default=InternetContent.DefaultTimeout)
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Object.

Definition at line 2571 of file InternetContent.cs.

◆ HeadAsync() [4/6]

static Task< ContentResponse > Waher.Content.InternetContent.HeadAsync ( Uri  Uri,
X509Certificate  Certificate,
EventHandler< RemoteCertificateEventArgs RemoteCertificateValidator,
params KeyValuePair< string, string >[]  Headers 
)
static

Heads a resource, given its URI.

Parameters
UriUniform resource identifier.
CertificateOptional client certificate to use in a Mutual TLS session.
RemoteCertificateValidatorOptional validator of remote certificates.
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Object.

Definition at line 2528 of file InternetContent.cs.

◆ HeadAsync() [5/6]

static Task< ContentResponse > Waher.Content.InternetContent.HeadAsync ( Uri  Uri,
X509Certificate  Certificate,
int  TimeoutMs,
params KeyValuePair< string, string >[]  Headers 
)
static

Heads a resource, given its URI.

Parameters
UriUniform resource identifier.
CertificateOptional client certificate to use in a Mutual TLS session.
TimeoutMsTimeout, in milliseconds. (Default=InternetContent.DefaultTimeout)
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Object.

Definition at line 2557 of file InternetContent.cs.

◆ HeadAsync() [6/6]

static Task< ContentResponse > Waher.Content.InternetContent.HeadAsync ( Uri  Uri,
X509Certificate  Certificate,
params KeyValuePair< string, string >[]  Headers 
)
static

Heads a resource, given its URI.

Parameters
UriUniform resource identifier.
CertificateOptional client certificate to use in a Mutual TLS session.
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Object.

Definition at line 2515 of file InternetContent.cs.

◆ IsAccepted() [1/3]

static bool Waher.Content.InternetContent.IsAccepted ( string  ContentType,
params string[]  AcceptedContentTypes 
)
static

Checks if a given content type is acceptable.

Parameters
ContentTypeContent type.
AcceptedContentTypesOptional array of accepted content types. If array is empty, all content types are accepted.

Definition at line 388 of file InternetContent.cs.

◆ IsAccepted() [2/3]

static bool Waher.Content.InternetContent.IsAccepted ( string[]  ContentTypes,
out string  ContentType,
params string[]  AcceptedContentTypes 
)
static

Checks if at least one content type in a set of content types is acceptable.

Parameters
ContentTypesContent types.
ContentTypeContent type selected as the first acceptable content type.
AcceptedContentTypesOptional array of accepted content types. If array is empty, all content types are accepted.

Definition at line 412 of file InternetContent.cs.

◆ IsAccepted() [3/3]

static bool Waher.Content.InternetContent.IsAccepted ( string[]  ContentTypes,
params string[]  AcceptedContentTypes 
)
static

Checks if at least one content type in a set of content types is acceptable.

Parameters
ContentTypesContent types.
AcceptedContentTypesOptional array of accepted content types. If array is empty, all content types are accepted.

Definition at line 401 of file InternetContent.cs.

◆ IsLocalDomain()

static bool Waher.Content.InternetContent.IsLocalDomain ( string  DomainOrHost,
bool  IncludeAlternativeDomains 
)
static

Checks if a domain or nost name is local.

Parameters
DomainOrHostDomain or host name.
IncludeAlternativeDomainsIf alternative domains are to be checked as well.
Returns
If the domain or host name is local.

Definition at line 2910 of file InternetContent.cs.

◆ ParseContentType()

static bool Waher.Content.InternetContent.ParseContentType ( ref string  ContentType,
out Encoding  Encoding,
out KeyValuePair< string, string >[]  Fields 
)
static

Parses a Content-Type, providing the base Content-Type, character encoding, if any, and other field parameters available.

Parameters
ContentTypeContent type string to parse.
EncodingEncoding, if found, null otherwise.
FieldsArray of fields.
Returns
If there was any information available apart from the base Content-Type to parse. If true, ContentType has been changed to the base Content-Type and Encoding and Fields reflect the information parsed.

Definition at line 689 of file InternetContent.cs.

◆ PostAsync() [1/12]

static Task< ContentBinaryResponse > Waher.Content.InternetContent.PostAsync ( Uri  Uri,
byte[]  EncodedData,
string  ContentType,
int  TimeoutMs,
params KeyValuePair< string, string >[]  Headers 
)
static

Posts to a resource, using a Uniform Resource Identifier (or Locator).

Parameters
UriURI
EncodedDataEncoded data to be posted.
ContentTypeContent-Type of encoded data in EncodedData .
TimeoutMsTimeout, in milliseconds. (Default=InternetContent.DefaultTimeout)
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Encoded response.

Definition at line 1779 of file InternetContent.cs.

◆ PostAsync() [2/12]

static Task< ContentBinaryResponse > Waher.Content.InternetContent.PostAsync ( Uri  Uri,
byte[]  EncodedData,
string  ContentType,
params KeyValuePair< string, string >[]  Headers 
)
static

Posts to a resource, using a Uniform Resource Identifier (or Locator).

Parameters
UriURI
EncodedDataEncoded data to be posted.
ContentTypeContent-Type of encoded data in EncodedData .
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Encoded response.

Definition at line 1731 of file InternetContent.cs.

◆ PostAsync() [3/12]

static Task< ContentBinaryResponse > Waher.Content.InternetContent.PostAsync ( Uri  Uri,
byte[]  EncodedData,
string  ContentType,
X509Certificate  Certificate,
EventHandler< RemoteCertificateEventArgs RemoteCertificateValidator,
int  TimeoutMs,
params KeyValuePair< string, string >[]  Headers 
)
static

Posts to a resource, using a Uniform Resource Identifier (or Locator).

Parameters
UriURI
EncodedDataEncoded data to be posted.
ContentTypeContent-Type of encoded data in EncodedData .
CertificateOptional client certificate to use in a Mutual TLS session.
RemoteCertificateValidatorOptional validator of remote certificates.
TimeoutMsTimeout, in milliseconds. (Default=InternetContent.DefaultTimeout)
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Encoded response.

Definition at line 1811 of file InternetContent.cs.

◆ PostAsync() [4/12]

static Task< ContentBinaryResponse > Waher.Content.InternetContent.PostAsync ( Uri  Uri,
byte[]  EncodedData,
string  ContentType,
X509Certificate  Certificate,
EventHandler< RemoteCertificateEventArgs RemoteCertificateValidator,
params KeyValuePair< string, string >[]  Headers 
)
static

Posts to a resource, using a Uniform Resource Identifier (or Locator).

Parameters
UriURI
EncodedDataEncoded data to be posted.
ContentTypeContent-Type of encoded data in EncodedData .
CertificateOptional client certificate to use in a Mutual TLS session.
RemoteCertificateValidatorOptional validator of remote certificates.
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Encoded response.

Definition at line 1761 of file InternetContent.cs.

◆ PostAsync() [5/12]

static Task< ContentBinaryResponse > Waher.Content.InternetContent.PostAsync ( Uri  Uri,
byte[]  EncodedData,
string  ContentType,
X509Certificate  Certificate,
int  TimeoutMs,
params KeyValuePair< string, string >[]  Headers 
)
static

Posts to a resource, using a Uniform Resource Identifier (or Locator).

Parameters
UriURI
EncodedDataEncoded data to be posted.
ContentTypeContent-Type of encoded data in EncodedData .
CertificateOptional client certificate to use in a Mutual TLS session.
TimeoutMsTimeout, in milliseconds. (Default=InternetContent.DefaultTimeout)
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Encoded response.

Definition at line 1794 of file InternetContent.cs.

◆ PostAsync() [6/12]

static Task< ContentBinaryResponse > Waher.Content.InternetContent.PostAsync ( Uri  Uri,
byte[]  EncodedData,
string  ContentType,
X509Certificate  Certificate,
params KeyValuePair< string, string >[]  Headers 
)
static

Posts to a resource, using a Uniform Resource Identifier (or Locator).

Parameters
UriURI
EncodedDataEncoded data to be posted.
ContentTypeContent-Type of encoded data in EncodedData .
CertificateOptional client certificate to use in a Mutual TLS session.
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Encoded response.

Definition at line 1745 of file InternetContent.cs.

◆ PostAsync() [7/12]

static Task< ContentResponse > Waher.Content.InternetContent.PostAsync ( Uri  Uri,
object  Data,
int  TimeoutMs,
params KeyValuePair< string, string >[]  Headers 
)
static

Posts to a resource, using a Uniform Resource Identifier (or Locator).

Parameters
UriURI
DataData to post.
TimeoutMsTimeout, in milliseconds. (Default=InternetContent.DefaultTimeout)
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Decoded response.

Definition at line 1685 of file InternetContent.cs.

◆ PostAsync() [8/12]

static Task< ContentResponse > Waher.Content.InternetContent.PostAsync ( Uri  Uri,
object  Data,
params KeyValuePair< string, string >[]  Headers 
)
static

Posts to a resource, using a Uniform Resource Identifier (or Locator).

Parameters
UriURI
DataData to post.
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Decoded response.

Definition at line 1641 of file InternetContent.cs.

◆ PostAsync() [9/12]

static Task< ContentResponse > Waher.Content.InternetContent.PostAsync ( Uri  Uri,
object  Data,
X509Certificate  Certificate,
EventHandler< RemoteCertificateEventArgs RemoteCertificateValidator,
int  TimeoutMs,
params KeyValuePair< string, string >[]  Headers 
)
static

Posts to a resource, using a Uniform Resource Identifier (or Locator).

Parameters
UriURI
DataData to post.
CertificateOptional client certificate to use in a Mutual TLS session.
RemoteCertificateValidatorOptional validator of remote certificates.
TimeoutMsTimeout, in milliseconds. (Default=InternetContent.DefaultTimeout)
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Decoded response.

Definition at line 1714 of file InternetContent.cs.

◆ PostAsync() [10/12]

static Task< ContentResponse > Waher.Content.InternetContent.PostAsync ( Uri  Uri,
object  Data,
X509Certificate  Certificate,
EventHandler< RemoteCertificateEventArgs RemoteCertificateValidator,
params KeyValuePair< string, string >[]  Headers 
)
static

Posts to a resource, using a Uniform Resource Identifier (or Locator).

Parameters
UriURI
DataData to post.
CertificateOptional client certificate to use in a Mutual TLS session.
RemoteCertificateValidatorOptional validator of remote certificates.
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Decoded response.

Definition at line 1668 of file InternetContent.cs.

◆ PostAsync() [11/12]

static Task< ContentResponse > Waher.Content.InternetContent.PostAsync ( Uri  Uri,
object  Data,
X509Certificate  Certificate,
int  TimeoutMs,
params KeyValuePair< string, string >[]  Headers 
)
static

Posts to a resource, using a Uniform Resource Identifier (or Locator).

Parameters
UriURI
DataData to post.
CertificateOptional client certificate to use in a Mutual TLS session.
TimeoutMsTimeout, in milliseconds. (Default=InternetContent.DefaultTimeout)
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Decoded response.

Definition at line 1699 of file InternetContent.cs.

◆ PostAsync() [12/12]

static Task< ContentResponse > Waher.Content.InternetContent.PostAsync ( Uri  Uri,
object  Data,
X509Certificate  Certificate,
params KeyValuePair< string, string >[]  Headers 
)
static

Posts to a resource, using a Uniform Resource Identifier (or Locator).

Parameters
UriURI
DataData to post.
CertificateOptional client certificate to use in a Mutual TLS session.
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Decoded response.

Definition at line 1654 of file InternetContent.cs.

◆ PutAsync() [1/12]

static Task< ContentBinaryResponse > Waher.Content.InternetContent.PutAsync ( Uri  Uri,
byte[]  EncodedData,
string  ContentType,
int  TimeoutMs,
params KeyValuePair< string, string >[]  Headers 
)
static

Puts to a resource, using a Uniform Resource Identifier (or Locator).

Parameters
UriURI
EncodedDataEncoded data to be put.
ContentTypeContent-Type of encoded data in EncodedData .
TimeoutMsTimeout, in milliseconds. (Default=InternetContent.DefaultTimeout)
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Encoded response.

Definition at line 2101 of file InternetContent.cs.

◆ PutAsync() [2/12]

static Task< ContentBinaryResponse > Waher.Content.InternetContent.PutAsync ( Uri  Uri,
byte[]  EncodedData,
string  ContentType,
params KeyValuePair< string, string >[]  Headers 
)
static

Puts to a resource, using a Uniform Resource Identifier (or Locator).

Parameters
UriURI
EncodedDataEncoded data to be put.
ContentTypeContent-Type of encoded data in EncodedData .
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Encoded response.

Definition at line 2054 of file InternetContent.cs.

◆ PutAsync() [3/12]

static Task< ContentBinaryResponse > Waher.Content.InternetContent.PutAsync ( Uri  Uri,
byte[]  EncodedData,
string  ContentType,
X509Certificate  Certificate,
EventHandler< RemoteCertificateEventArgs RemoteCertificateValidator,
int  TimeoutMs,
params KeyValuePair< string, string >[]  Headers 
)
static

Puts to a resource, using a Uniform Resource Identifier (or Locator).

Parameters
UriURI
EncodedDataEncoded data to be put.
ContentTypeContent-Type of encoded data in EncodedData .
CertificateOptional client certificate to use in a Mutual TLS session.
RemoteCertificateValidatorOptional validator of remote certificates.
TimeoutMsTimeout, in milliseconds. (Default=InternetContent.DefaultTimeout)
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Encoded response.

Definition at line 2132 of file InternetContent.cs.

◆ PutAsync() [4/12]

static Task< ContentBinaryResponse > Waher.Content.InternetContent.PutAsync ( Uri  Uri,
byte[]  EncodedData,
string  ContentType,
X509Certificate  Certificate,
EventHandler< RemoteCertificateEventArgs RemoteCertificateValidator,
params KeyValuePair< string, string >[]  Headers 
)
static

Puts to a resource, using a Uniform Resource Identifier (or Locator).

Parameters
UriURI
EncodedDataEncoded data to be put.
ContentTypeContent-Type of encoded data in EncodedData .
CertificateOptional client certificate to use in a Mutual TLS session.
RemoteCertificateValidatorOptional validator of remote certificates.
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Encoded response.

Definition at line 2083 of file InternetContent.cs.

◆ PutAsync() [5/12]

static Task< ContentBinaryResponse > Waher.Content.InternetContent.PutAsync ( Uri  Uri,
byte[]  EncodedData,
string  ContentType,
X509Certificate  Certificate,
int  TimeoutMs,
params KeyValuePair< string, string >[]  Headers 
)
static

Puts to a resource, using a Uniform Resource Identifier (or Locator).

Parameters
UriURI
EncodedDataEncoded data to be put.
ContentTypeContent-Type of encoded data in EncodedData .
CertificateOptional client certificate to use in a Mutual TLS session.
TimeoutMsTimeout, in milliseconds. (Default=InternetContent.DefaultTimeout)
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Encoded response.

Definition at line 2116 of file InternetContent.cs.

◆ PutAsync() [6/12]

static Task< ContentBinaryResponse > Waher.Content.InternetContent.PutAsync ( Uri  Uri,
byte[]  EncodedData,
string  ContentType,
X509Certificate  Certificate,
params KeyValuePair< string, string >[]  Headers 
)
static

Puts to a resource, using a Uniform Resource Identifier (or Locator).

Parameters
UriURI
EncodedDataEncoded data to be put.
ContentTypeContent-Type of encoded data in EncodedData .
CertificateOptional client certificate to use in a Mutual TLS session.
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Encoded response.

Definition at line 2068 of file InternetContent.cs.

◆ PutAsync() [7/12]

static Task< ContentResponse > Waher.Content.InternetContent.PutAsync ( Uri  Uri,
object  Data,
int  TimeoutMs,
params KeyValuePair< string, string >[]  Headers 
)
static

Puts to a resource, using a Uniform Resource Identifier (or Locator).

Parameters
UriURI
DataData to put.
TimeoutMsTimeout, in milliseconds. (Default=InternetContent.DefaultTimeout)
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Decoded response.

Definition at line 2008 of file InternetContent.cs.

◆ PutAsync() [8/12]

static Task< ContentResponse > Waher.Content.InternetContent.PutAsync ( Uri  Uri,
object  Data,
params KeyValuePair< string, string >[]  Headers 
)
static

Puts to a resource, using a Uniform Resource Identifier (or Locator).

Parameters
UriURI
DataData to put.
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Decoded response.

Definition at line 1964 of file InternetContent.cs.

◆ PutAsync() [9/12]

static Task< ContentResponse > Waher.Content.InternetContent.PutAsync ( Uri  Uri,
object  Data,
X509Certificate  Certificate,
EventHandler< RemoteCertificateEventArgs RemoteCertificateValidator,
int  TimeoutMs,
params KeyValuePair< string, string >[]  Headers 
)
static

Puts to a resource, using a Uniform Resource Identifier (or Locator).

Parameters
UriURI
DataData to put.
CertificateOptional client certificate to use in a Mutual TLS session.
RemoteCertificateValidatorOptional validator of remote certificates.
TimeoutMsTimeout, in milliseconds. (Default=InternetContent.DefaultTimeout)
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Decoded response.

Definition at line 2037 of file InternetContent.cs.

◆ PutAsync() [10/12]

static Task< ContentResponse > Waher.Content.InternetContent.PutAsync ( Uri  Uri,
object  Data,
X509Certificate  Certificate,
EventHandler< RemoteCertificateEventArgs RemoteCertificateValidator,
params KeyValuePair< string, string >[]  Headers 
)
static

Puts to a resource, using a Uniform Resource Identifier (or Locator).

Parameters
UriURI
DataData to put.
CertificateOptional client certificate to use in a Mutual TLS session.
RemoteCertificateValidatorOptional validator of remote certificates.
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Decoded response.

Definition at line 1991 of file InternetContent.cs.

◆ PutAsync() [11/12]

static Task< ContentResponse > Waher.Content.InternetContent.PutAsync ( Uri  Uri,
object  Data,
X509Certificate  Certificate,
int  TimeoutMs,
params KeyValuePair< string, string >[]  Headers 
)
static

Puts to a resource, using a Uniform Resource Identifier (or Locator).

Parameters
UriURI
DataData to put.
CertificateOptional client certificate to use in a Mutual TLS session.
TimeoutMsTimeout, in milliseconds. (Default=InternetContent.DefaultTimeout)
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Decoded response.

Definition at line 2022 of file InternetContent.cs.

◆ PutAsync() [12/12]

static Task< ContentResponse > Waher.Content.InternetContent.PutAsync ( Uri  Uri,
object  Data,
X509Certificate  Certificate,
params KeyValuePair< string, string >[]  Headers 
)
static

Puts to a resource, using a Uniform Resource Identifier (or Locator).

Parameters
UriURI
DataData to put.
CertificateOptional client certificate to use in a Mutual TLS session.
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Decoded response.

Definition at line 1977 of file InternetContent.cs.

◆ QueryAsync() [1/12]

static Task< ContentBinaryResponse > Waher.Content.InternetContent.QueryAsync ( Uri  Uri,
byte[]  EncodedData,
string  ContentType,
int  TimeoutMs,
params KeyValuePair< string, string >[]  Headers 
)
static

Queries a resource, using a Uniform Resource Identifier (or Locator).

Parameters
UriURI
EncodedDataEncoded data to be queried.
ContentTypeContent-Type of encoded data in EncodedData .
TimeoutMsTimeout, in milliseconds. (Default=InternetContent.DefaultTimeout)
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Encoded response.

Definition at line 2860 of file InternetContent.cs.

◆ QueryAsync() [2/12]

static Task< ContentBinaryResponse > Waher.Content.InternetContent.QueryAsync ( Uri  Uri,
byte[]  EncodedData,
string  ContentType,
params KeyValuePair< string, string >[]  Headers 
)
static

Queries a resource, using a Uniform Resource Identifier (or Locator).

Parameters
UriURI
EncodedDataEncoded data to be queried.
ContentTypeContent-Type of encoded data in EncodedData .
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Encoded response.

Definition at line 2813 of file InternetContent.cs.

◆ QueryAsync() [3/12]

static Task< ContentBinaryResponse > Waher.Content.InternetContent.QueryAsync ( Uri  Uri,
byte[]  EncodedData,
string  ContentType,
X509Certificate  Certificate,
EventHandler< RemoteCertificateEventArgs RemoteCertificateValidator,
int  TimeoutMs,
params KeyValuePair< string, string >[]  Headers 
)
static

Queries a resource, using a Uniform Resource Identifier (or Locator).

Parameters
UriURI
EncodedDataEncoded data to be queried.
ContentTypeContent-Type of encoded data in EncodedData .
CertificateOptional client certificate to use in a Mutual TLS session.
RemoteCertificateValidatorOptional validator of remote certificates.
TimeoutMsTimeout, in milliseconds. (Default=InternetContent.DefaultTimeout)
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Encoded response.

Definition at line 2891 of file InternetContent.cs.

◆ QueryAsync() [4/12]

static Task< ContentBinaryResponse > Waher.Content.InternetContent.QueryAsync ( Uri  Uri,
byte[]  EncodedData,
string  ContentType,
X509Certificate  Certificate,
EventHandler< RemoteCertificateEventArgs RemoteCertificateValidator,
params KeyValuePair< string, string >[]  Headers 
)
static

Queries a resource, using a Uniform Resource Identifier (or Locator).

Parameters
UriURI
EncodedDataEncoded data to be queried.
ContentTypeContent-Type of encoded data in EncodedData .
CertificateOptional client certificate to use in a Mutual TLS session.
RemoteCertificateValidatorOptional validator of remote certificates.
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Encoded response.

Definition at line 2842 of file InternetContent.cs.

◆ QueryAsync() [5/12]

static Task< ContentBinaryResponse > Waher.Content.InternetContent.QueryAsync ( Uri  Uri,
byte[]  EncodedData,
string  ContentType,
X509Certificate  Certificate,
int  TimeoutMs,
params KeyValuePair< string, string >[]  Headers 
)
static

Queries a resource, using a Uniform Resource Identifier (or Locator).

Parameters
UriURI
EncodedDataEncoded data to be queried.
ContentTypeContent-Type of encoded data in EncodedData .
CertificateOptional client certificate to use in a Mutual TLS session.
TimeoutMsTimeout, in milliseconds. (Default=InternetContent.DefaultTimeout)
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Encoded response.

Definition at line 2875 of file InternetContent.cs.

◆ QueryAsync() [6/12]

static Task< ContentBinaryResponse > Waher.Content.InternetContent.QueryAsync ( Uri  Uri,
byte[]  EncodedData,
string  ContentType,
X509Certificate  Certificate,
params KeyValuePair< string, string >[]  Headers 
)
static

Queries a resource, using a Uniform Resource Identifier (or Locator).

Parameters
UriURI
EncodedDataEncoded data to be queried.
ContentTypeContent-Type of encoded data in EncodedData .
CertificateOptional client certificate to use in a Mutual TLS session.
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Encoded response.

Definition at line 2827 of file InternetContent.cs.

◆ QueryAsync() [7/12]

static Task< ContentResponse > Waher.Content.InternetContent.QueryAsync ( Uri  Uri,
object  Data,
int  TimeoutMs,
params KeyValuePair< string, string >[]  Headers 
)
static

Queries a resource, using a Uniform Resource Identifier (or Locator).

Parameters
UriURI
DataData to query.
TimeoutMsTimeout, in milliseconds. (Default=InternetContent.DefaultTimeout)
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Decoded response.

Definition at line 2767 of file InternetContent.cs.

◆ QueryAsync() [8/12]

static Task< ContentResponse > Waher.Content.InternetContent.QueryAsync ( Uri  Uri,
object  Data,
params KeyValuePair< string, string >[]  Headers 
)
static

Queries a resource, using a Uniform Resource Identifier (or Locator).

Parameters
UriURI
DataData to query.
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Decoded response.

Definition at line 2723 of file InternetContent.cs.

◆ QueryAsync() [9/12]

static Task< ContentResponse > Waher.Content.InternetContent.QueryAsync ( Uri  Uri,
object  Data,
X509Certificate  Certificate,
EventHandler< RemoteCertificateEventArgs RemoteCertificateValidator,
int  TimeoutMs,
params KeyValuePair< string, string >[]  Headers 
)
static

Queries a resource, using a Uniform Resource Identifier (or Locator).

Parameters
UriURI
DataData to query.
CertificateOptional client certificate to use in a Mutual TLS session.
RemoteCertificateValidatorOptional validator of remote certificates.
TimeoutMsTimeout, in milliseconds. (Default=InternetContent.DefaultTimeout)
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Decoded response.

Definition at line 2796 of file InternetContent.cs.

◆ QueryAsync() [10/12]

static Task< ContentResponse > Waher.Content.InternetContent.QueryAsync ( Uri  Uri,
object  Data,
X509Certificate  Certificate,
EventHandler< RemoteCertificateEventArgs RemoteCertificateValidator,
params KeyValuePair< string, string >[]  Headers 
)
static

Queries a resource, using a Uniform Resource Identifier (or Locator).

Parameters
UriURI
DataData to query.
CertificateOptional client certificate to use in a Mutual TLS session.
RemoteCertificateValidatorOptional validator of remote certificates.
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Decoded response.

Definition at line 2750 of file InternetContent.cs.

◆ QueryAsync() [11/12]

static Task< ContentResponse > Waher.Content.InternetContent.QueryAsync ( Uri  Uri,
object  Data,
X509Certificate  Certificate,
int  TimeoutMs,
params KeyValuePair< string, string >[]  Headers 
)
static

Queries a resource, using a Uniform Resource Identifier (or Locator).

Parameters
UriURI
DataData to query.
CertificateOptional client certificate to use in a Mutual TLS session.
TimeoutMsTimeout, in milliseconds. (Default=InternetContent.DefaultTimeout)
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Decoded response.

Definition at line 2781 of file InternetContent.cs.

◆ QueryAsync() [12/12]

static Task< ContentResponse > Waher.Content.InternetContent.QueryAsync ( Uri  Uri,
object  Data,
X509Certificate  Certificate,
params KeyValuePair< string, string >[]  Headers 
)
static

Queries a resource, using a Uniform Resource Identifier (or Locator).

Parameters
UriURI
DataData to query.
CertificateOptional client certificate to use in a Mutual TLS session.
HeadersOptional headers. Interpreted in accordance with the corresponding URI scheme.
Returns
Decoded response.

Definition at line 2736 of file InternetContent.cs.

◆ SetDefaultTimeout()

static void Waher.Content.InternetContent.SetDefaultTimeout ( int  Timeout,
bool  Lock 
)
static

Sets the default timeout of internet access methods, in milliseconds.

Parameters
TimeoutTimeout, in milliseconds.
LockIf the default timeout should be locked.
Exceptions
ArgumentExceptionIf attempting to set an invalid timeout.
InvalidOperationExceptionIf attempting to change a locked timeout.

Definition at line 148 of file InternetContent.cs.

◆ TryGetContentType()

static bool Waher.Content.InternetContent.TryGetContentType ( string  FileExtension,
out string  ContentType 
)
static

Tries to get the content type of an item, given its file extension.

Parameters
FileExtensionFile extension.
ContentTypeContent type.
Returns
If the extension was recognized.

Definition at line 782 of file InternetContent.cs.

◆ TryGetFileExtension()

static bool Waher.Content.InternetContent.TryGetFileExtension ( string  ContentType,
out string  FileExtension 
)
static

Tries to get the file extension of an item, given its content type.

Parameters
ContentTypeContent type.
FileExtensionFile extension.
Returns
If the Content-Type was recognized.

Definition at line 844 of file InternetContent.cs.

Member Data Documentation

◆ ISO_8859_1

readonly Encoding Waher.Content.InternetContent.ISO_8859_1 = Encoding.GetEncoding("ISO-8859-1")
static

ISO-8859-1 character encoding.

Definition at line 23 of file InternetContent.cs.

Property Documentation

◆ CanDecodeContentTypes

string [] Waher.Content.InternetContent.CanDecodeContentTypes
staticget

Internet content types that can be decoded.

Definition at line 446 of file InternetContent.cs.

◆ CanDecodeFileExtensions

string [] Waher.Content.InternetContent.CanDecodeFileExtensions
staticget

File extensions that can be decoded.

Definition at line 473 of file InternetContent.cs.

◆ CanDeleteToUriSchemes

string [] Waher.Content.InternetContent.CanDeleteToUriSchemes
staticget

Internet URI Schemes that can be deleted to.

Definition at line 2148 of file InternetContent.cs.

◆ CanEncodeContentTypes

string [] Waher.Content.InternetContent.CanEncodeContentTypes
staticget

Internet content types that can be encoded.

Definition at line 167 of file InternetContent.cs.

◆ CanEncodeFileExtensions

string [] Waher.Content.InternetContent.CanEncodeFileExtensions
staticget

File extensions that can be encoded.

Definition at line 194 of file InternetContent.cs.

◆ CanGetUriSchemes

string [] Waher.Content.InternetContent.CanGetUriSchemes
staticget

Internet URI Schemes that can be gotten.

Definition at line 1112 of file InternetContent.cs.

◆ CanHeadUriSchemes

string [] Waher.Content.InternetContent.CanHeadUriSchemes
staticget

Internet URI Schemes where it is possible to get headers.

Definition at line 2368 of file InternetContent.cs.

◆ CanPostToUriSchemes

string [] Waher.Content.InternetContent.CanPostToUriSchemes
staticget

Internet URI Schemes that can be posted to.

Definition at line 1505 of file InternetContent.cs.

◆ CanPutToUriSchemes

string [] Waher.Content.InternetContent.CanPutToUriSchemes
staticget

Internet URI Schemes that can be put to.

Definition at line 1828 of file InternetContent.cs.

◆ CanQueryToUriSchemes

string [] Waher.Content.InternetContent.CanQueryToUriSchemes
staticget

Internet URI Schemes that can be queried.

Definition at line 2587 of file InternetContent.cs.

◆ Converters

IContentConverter [] Waher.Content.InternetContent.Converters
staticget

Available Internet Content Converters.

Definition at line 891 of file InternetContent.cs.

◆ Decoders

IContentDecoder [] Waher.Content.InternetContent.Decoders
staticget

Available Internet Content Decoders.

Definition at line 500 of file InternetContent.cs.

◆ DefaultTimeout

int Waher.Content.InternetContent.DefaultTimeout
staticget

Default timeout of internet access methods, in milliseconds.

Definition at line 139 of file InternetContent.cs.

◆ Deleters

IContentDeleter [] Waher.Content.InternetContent.Deleters
staticget

Available Internet Content Deleters.

Definition at line 2175 of file InternetContent.cs.

◆ Encoders

IContentEncoder [] Waher.Content.InternetContent.Encoders
staticget

Available Internet Content Encoders.

Definition at line 221 of file InternetContent.cs.

◆ Getters

IContentGetter [] Waher.Content.InternetContent.Getters
staticget

Available Internet Content Getters.

Definition at line 1139 of file InternetContent.cs.

◆ Headers

IContentHeader [] Waher.Content.InternetContent.Headers
staticget

Available Internet Content Header-retrievers.

Definition at line 2395 of file InternetContent.cs.

◆ Posters

IContentPoster [] Waher.Content.InternetContent.Posters
staticget

Available Internet Content Posters.

Definition at line 1532 of file InternetContent.cs.

◆ Putters

IContentPutter [] Waher.Content.InternetContent.Putters
staticget

Available Internet Content Putters.

Definition at line 1855 of file InternetContent.cs.

◆ Queries

IContentQuery [] Waher.Content.InternetContent.Queries
staticget

Available Internet Content Queries.

Definition at line 2614 of file InternetContent.cs.

Event Documentation

◆ LocalDomainCheck

EventHandler<LocalDomainEventArgs> Waher.Content.InternetContent.LocalDomainCheck = null
static

Event raised when a local domain is to be checked.

Definition at line 2924 of file InternetContent.cs.


The documentation for this class was generated from the following file: