A class representing the Response to a Http Request.
data | Gets the data sent with the request. |
failCallback | Gets the fail callback treenode. |
host | Gets the host used in the request. |
labelProperties | Use your own named properties to get/set label values. |
method | Gets the request Http.Method used in the request. |
path | Gets the resource path used in the request. |
port | Gets the port the request was sent to. |
receivedBytes | Gets the amount of bytes of the response message received. |
statusCallback | Gets the status callback treenode. |
statusCode | Gets the request's Http status code. |
successCallback | Gets the success callback treenode. |
timeout | Gets the request timeout in ms used in the request. |
totalBytes | Gets the size of the response message in bytes. |
useSSL | Gets whether SSL was used in the request. |
value | Gets the response message ot the Http request. |
saveToFile | Saves the Http.Response value to a file. |
readonly treenode failCallback
Gets the fail callback treenode.
readonly Variant labelProperties
Use your own named properties to get/set label values.
custom labels on Http.Response objects are inherited from the Http.Request object.
Http.Request request = Http.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
readonly int method
Gets the request Http.Method used in the request.
readonly int receivedBytes
Gets the amount of bytes of the response message received.
readonly treenode statusCallback
Gets the status callback treenode.
readonly int statusCode
Gets the request's Http status code.
Http.Request request = Http.Request("https://www.flexsim.com/");
request.statusCallback = Model.find("Tools/statusCallback");
request.myProcessor = Model.find("Processor1");
request.sendAndWait();
//In the statusCallback node//
Http.Response response = param(1);
print(response.statusCode); // last print should be a 200
readonly treenode successCallback
Gets the success callback treenode.
readonly int timeout
Gets the request timeout in ms used in the request.
readonly int totalBytes
Gets the size of the response message in bytes.
readonly string value
Gets the response message ot the Http request.
Http.Request request = Http.Request("https://www.flexsim.com/");
request.statusCallback = Model.find("Tools/statusCallback");
request.myProcessor = Model.find("Processor1");
Http.Response response = request.sendAndWait();
print(response.value); //prints the response message
void saveToFile( string filePath ) |
Saves the Http.Response value to a file.
Http.Request request;
request.host = "www.flexsim.com";
request.port = 443;
request.useSSL = 1;
request.successCallback = Model.find("Tools/successCallback");
Http.Response response = request.sendAndWait();
response.saveToFile(modeldir() + "flexsim_homepage.html");