SimpleHttpResult

Description

struct Tinman.Core.IO.SimpleHttpResult

Represents the result of a HTTP/HTTPS request.

See also

ISimpleHttp

Public / Methods

To​String


public override method ToString → ()

returns → string

The string representation.

Returns the string representation of this value.

The string representation is '(CODE) TEXT', where CODE is the value of StatusCode and TEXT is the value of StatusText. If StatusCode is 0, then CODE will be set to -N-1, where N is the ordinal value of Error.

Public / Attributes

Content​Type


public readonly attribute ContentType → (string)

Value of the Content-Type HTTP response header field.

Error


public readonly attribute Error → (IOError)

The non-protocol error that has occurred.

If StatusCode is equal to 0, this value describes the non-protocol error that has occurred. Otherwise, this value has no meaning and will be set to IOError.Other.

Is​Success


public attribute IsSuccess → (get)

value : bool

true if the HTTP request was successful, false if it has failed.

Does this SimpleHttpResult value represent a successful HTTP request?

Length


public readonly attribute Length → (int64)

Length of the content, in bytes.

This is the number of received content bytes. Will be equal to the value of the Content-Length HTTP response header field, if it is present (it may be omitted in some cases, for example when using HTTP Chunked Transfer Coding).

Status​Code


public readonly attribute StatusCode → (int32)

The HTTP status code or 0 for non-protocol errors (see Error).

Status​Text


public readonly attribute StatusText → (string)

The HTTP status text.

Time


public readonly attribute Time → (int32)

The total time of the request, in milliseconds.