Http.Request

Description

A class for creating a Http Request.

Properties

data Gets/sets the data being sent with the request.
failCallback Specify the fail callback treenode.
host Gets/sets the host.
labelProperties Use your own named properties to get/set label values.
method Specify the request Http.Method.
path Gets/sets the resource path.
port Gets/sets the port the request is being sent to.
statusCallback Specify the status callback treenode.
successCallback Specify the success callback treenode.
timeout Specify the request timeout in ms.
useSSL Specify whether to use SSL if applicable.

Methods

send Send an asynchronous Http request.
sendAndWait Send a synchronous Http request.

Static Methods

Http.Request Creates a Http.Request based on the given url.

Details

Do no remove, this fixes the anchor on doc.flexsim.com

Http.Request.data

string data

Description

Gets/sets the data being sent with the request.


			  Http.Request request;
			  request.host = "www.flexsim.com";
			  request.data = "name1=value1";
			
Do no remove, this fixes the anchor on doc.flexsim.com

Http.Request.failCallback

treenode failCallback

Description

Specify the fail callback treenode.


				Http.Request request;
				request.host = "www.flexsim.com";
				request.failCallback = Model.find("Tools/failCallback");
			
Do no remove, this fixes the anchor on doc.flexsim.com

Http.Request.host

string host

Description

Gets/sets the host.


			  Http.Request request;
			  request.host = "www.flexsim.com";
			
Do no remove, this fixes the anchor on doc.flexsim.com

Http.Request.labelProperties

Variant labelProperties

Description

Use your own named properties to get/set label values.

Custom properties added to Http.Request objects will be accessible with the same name on Http.Response objects created in callbacks and the return value of sendAndWait().


			Http.Request request = Htt.Request("https://www.flexsim.com/");
			request.statusCallback = Model.find("Tools/statusCallback");
			request.myProcessor = Model.find("Processor1");
			Http.Response response = request.sendAndWait();
			print(response.myProcessor); // /Processor1
			
Do no remove, this fixes the anchor on doc.flexsim.com

Http.Request.method

int method

Description

Specify the request Http.Method.


				Http.Request request;
				request.host = "www.flexsim.com";
				request.method = Http.Method.Get;
			
Do no remove, this fixes the anchor on doc.flexsim.com

Http.Request.path

string path

Description

Gets/sets the resource path.


			  Http.Request request;
			  request.host = "www.flexsim.com";
			  request.path = "flexsim";
			
Do no remove, this fixes the anchor on doc.flexsim.com

Http.Request.port

int port

Description

Gets/sets the port the request is being sent to.


				Http.Request request;
				request.host = "www.flexsim.com";
				request.port = 443;
			
Do no remove, this fixes the anchor on doc.flexsim.com

Http.Request.statusCallback

treenode statusCallback

Description

Specify the status callback treenode.


				Http.Request request;
				request.host = "www.flexsim.com";
				request.statusCallback = Model.find("Tools/statusCallback");
			
Do no remove, this fixes the anchor on doc.flexsim.com

Http.Request.successCallback

treenode successCallback

Description

Specify the success callback treenode.


				Http.Request request;
				request.host = "www.flexsim.com";
				request.successCallback = Model.find("Tools/successCallback");
			
Do no remove, this fixes the anchor on doc.flexsim.com

Http.Request.timeout

int timeout

Description

Specify the request timeout in ms.


				Http.Request request;
				request.host = "www.flexsim.com";
				request.timeout = 1000; // 1 second timeout
			
Do no remove, this fixes the anchor on doc.flexsim.com

Http.Request.useSSL

int useSSL

Description

Specify whether to use SSL if applicable.


				Http.Request request;
				request.host = "www.flexsim.com";
				request.useSSL = 1;
			
Do no remove, this fixes the anchor on doc.flexsim.com

Http.Request.send()

void send( )

Description

Send an asynchronous Http request.


			Http.Request request;
			request.host = "www.flexsim.com";
			request.port = 443;
			request.useSSL = 1;
			request.successCallback = Model.find("Tools/successCallback");
			request.send();
			
Do no remove, this fixes the anchor on doc.flexsim.com

Http.Request.sendAndWait()

Http.Response sendAndWait( )

Description

Send a synchronous Http request.


			Http.Request request;
			request.host = "www.flexsim.com";
			request.port = 443;
			request.useSSL = 1;
			request.status = Model.find("Tools/statusCallback");
			Http.Response response = request.sendAndWait();
			
Do no remove, this fixes the anchor on doc.flexsim.com

Http.Request.Http.Request()

static Http.Request Http.Request( string URL )

Parameters

URL A URL specifying the host, and can include the protocol(Http/Https), the port, and the reference path.

Returns

Http.Request A Http.Request

Description

Creates a Http.Request based on the given url.


		Http.Request request = Htt.Request("https://www.flexsim.com:443/flexsim/");