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

Contains information about a response to a content request. More...

Inheritance diagram for Waher.Content.ContentResponse:
Waher.Events.IDisposableAsync

Public Member Functions

 ContentResponse (string ContentType, object Decoded, byte[] Encoded)
 Contains information about a success response to a content request. More...
 
 ContentResponse (Exception Error)
 Contains information about an error response to a content request. More...
 
void Dispose ()
 IDisposable.Dispose More...
 
async Task DisposeAsync ()
 IDisposableAsync.DisposeAsync More...
 
void AssertOk ()
 Asserts response is OK. More...
 

Properties

string ContentType [get]
 Internet Content-Type of encoded object. More...
 
object Decoded [get]
 Decoded object. More...
 
byte[] Encoded [get]
 Encoded object. More...
 
bool HasError [get]
 If an error occurred. More...
 
Exception Error [get]
 Error response. More...
 

Detailed Description

Contains information about a response to a content request.

Definition at line 10 of file ContentResponse.cs.

Constructor & Destructor Documentation

◆ ContentResponse() [1/2]

Waher.Content.ContentResponse.ContentResponse ( string  ContentType,
object  Decoded,
byte[]  Encoded 
)

Contains information about a success response to a content request.

Parameters
ContentTypeInternet Content-Type of encoded object.
DecodedDecoded object.
EncodedEncoded object.

Definition at line 21 of file ContentResponse.cs.

◆ ContentResponse() [2/2]

Waher.Content.ContentResponse.ContentResponse ( Exception  Error)

Contains information about an error response to a content request.

Parameters
ErrorEncoded error.

Definition at line 35 of file ContentResponse.cs.

Member Function Documentation

◆ AssertOk()

void Waher.Content.ContentResponse.AssertOk ( )

Asserts response is OK.

Definition at line 102 of file ContentResponse.cs.

◆ Dispose()

void Waher.Content.ContentResponse.Dispose ( )

IDisposable.Dispose

Implements Waher.Events.IDisposableAsync.

Definition at line 83 of file ContentResponse.cs.

◆ DisposeAsync()

async Task Waher.Content.ContentResponse.DisposeAsync ( )

Property Documentation

◆ ContentType

string Waher.Content.ContentResponse.ContentType
get

Internet Content-Type of encoded object.

Definition at line 48 of file ContentResponse.cs.

◆ Decoded

object Waher.Content.ContentResponse.Decoded
get

Decoded object.

Definition at line 53 of file ContentResponse.cs.

◆ Encoded

byte [] Waher.Content.ContentResponse.Encoded
get

Encoded object.

Definition at line 67 of file ContentResponse.cs.

◆ Error

Exception Waher.Content.ContentResponse.Error
get

Error response.

Definition at line 77 of file ContentResponse.cs.

◆ HasError

bool Waher.Content.ContentResponse.HasError
get

If an error occurred.

Definition at line 72 of file ContentResponse.cs.


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