Stream.HTTP
Stream.HTTP
Stream.HTTP.GetCommand
string GetCommand(string Uri)
Send a GET command to a uri and returns the value as a string format.
Parameters
|
Parameter |
Description |
|
Uri |
URL, Computer name or IP address |
Returns
string
Example
var result = Stream.HTTP.GetCommand("Uri");
Stream.HTTP.PostCommand
string PostCommand(string Uri, string strData)
Send a POST command, with a request body, to a URI and returns the response as a string.
Parameters
|
Parameter |
Description |
|
Uri |
URL, Computer name or IP address |
|
strData |
Request body to send; posted as JSON (Content-Type: application/json). Example: { "firstName": "Edward" } |
Returns
string
Example
var result = Stream.HTTP.PostCommand("Uri", "strData");