HTTP

HTTP Client, request data, request method, request options, and response docs.

HttpClient Class

The Http Client can be used to make HTTP requests to external services.

Syntax

Member Details

Request Method

Performs a HTTP request.

Syntax

Parameters

url

The url. It may include parameters, but they must be url-encoded.

handler

The event handler to be called when the request is complete

Remarks

Requirements

Namespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0


Request Method

Performs a HTTP request.

Syntax

Parameters

url

The url. It may include parameters, but they must be url-encoded.

requestOptions

The request options struct

handler

The event handler to be called when the request is complete

Remarks

Requirements

Namespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0



HttpClient.RequestData Class

The result of a HttpClient.Request(string, HttpRequestOptions, Action<Sansar.Simulation.HttpClient.RequestData>) call.

Syntax

Member Details

Response Property

Syntax

[get: Sansar.Script.Interface] public HttpResponse Response { get; }

Value

Only valid if Sansar.Script.OperationCompleteEvent.Success is true.

Remarks

Requirements

Namespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0


ToString Method

A string representation of this object.

Syntax

[Sansar.Script.Interface] public override string ToString ()

Returns

A string representation of this object.

Remarks

Requirements

Namespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0



HttpRequestOptions Struct

Options used for HttpClient.Request(string, HttpRequestOptions, Action<Sansar.Simulation.HttpClient.RequestData>)

Syntax

[Sansar.Script.Interface] public struct HttpRequestOptions

Member Details

Body Field

Syntax

[Sansar.Script.Interface] public string Body

Remarks

May be null.

Requirements

Namespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0


DisableRedirect Field

Disable automatic redirects.

Syntax

[Sansar.Script.Interface] public bool DisableRedirect

Remarks

Requirements

Namespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0


Method Field

Syntax

Remarks

Requirements

Namespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0


Parameters Field

Request parameters.

Syntax

Remarks

Requirements

Namespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0



HttpResponse Struct

Data returned from HttpClient.Request(string, HttpRequestOptions, Action<Sansar.Simulation.HttpClient.RequestData>)

Syntax

[Sansar.Script.Interface] public struct HttpResponse

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0

Members

See Also: Inherited members from ValueType.

Public Fields

Member Details

Body Field

The response body.

Syntax

[Sansar.Script.Interface] public string Body

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0


Headers Field

The headers from the response

Syntax

Remarks

Requirements

Namespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0


Status Field

The status code returned by the remote server.

Syntax

[Sansar.Script.Interface] public int Status

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0



Last updated