This MxM allows sending HTTP/HTTPS requests to a HTTP Server. These requests are GET, POST, PUT and DELETE.
These requests may be used to send/receive commands (for instance to REST compliant services, such as ‘Bing Maps’, ‘LinkedIn’ or ‘eBay’ online services, and many others, sometime offline, such as those embedded in appliances like ‘Philips hue’) but also to send/retrieve documents or data.
The selection between HTTP and HTTPS is merely done via the URL value indicated in the ‘URL’ parameter of commands.
This MXM supports the following authentication methods:
- Basic
- Digest-MD5
MxM Installation
The MXM Medialon HTTP Client requires Microsoft Visual C++ 2008 Redistributable Package (x86) to be installed into your computer to operate properly.
You can download this package here: vcredist_x86.exe.
Device Setup
Device creation window:
“Ignore SSL Errors”: (Disabled by default) This Setup option allows to ignore Ssl errors generated by self-signed certificate for example.
Note: Disabling this option will have an effect after reloading the project or restarting the application if the device has already been used.
Device Commands
Get
Requests data from the specified server.
URL: [String] The URL to be requested.
Request Headers: [String] (optional) The headers to apply to the request. Commands ‘Get Header’ or ‘Add Header’ can be used to manipulate this parameter.
Items: [String] (optional) It allows to specify the parameters for a URL (it supports special characters like #)
ItemsEncoding: [Enum] (optional) Specify the way to encode Items.
DefaultEncoding: Encode specific parameter like # in percent encoded form.
NoEncoding: specific parameters must be manually encoded (for example : -> %3A)
UserName: [String] (optional) It allows to specify the User Name for authentication.
Password: [String] (optional) It allows to specify the Password for authentication.
Note: The length of an URL is limited to a maximum of 2048 characters.
Post
Submits data to be processed by the specified server.
URL: [String] The URL to be requested.
Request Headers: [String] (optional) The headers to apply to the request. Commands ‘Get Header’ or ‘Add Header’ can be used to manipulate this parameter.
Data: [String] The Data to send with the request.
Items: [String] (optional) It allows to specify the parameters for a URL (it supports special characters like #)
ItemsEncoding: [Enum] (optional) Specify the way to encode Items.
DefaultEncoding: Encode specific parameter like # in percent encoded form.
NoEncoding: specific parameters must be manually encoded (for example : -> %3A)
UserName: [String] (optional) It allows to specify the User Name for authentication.
Password: [String] (optional) It allows to specify the Password for authentication.
Download File
Download a file from the server and save it in a specific directory.
URL: [String] The URL to be requested.
Request Headers: [String] (optional) The headers to apply to the request. Commands ‘Get Header’ or ‘Add Header’ can be used to manipulate this parameter.
Path: [String] The Path where the file must be saved.
Items: [String] (optional) It allows to specify the parameters for a URL (it supports special characters like #)
ItemsEncoding: [Enum] (optional) Specify the way to encode Items.
DefaultEncoding: Encode specific parameter like # in percent encoded form.
NoEncoding: specific parameters must be manually encoded (for example : -> %3A)
UserName: [String] (optional) It allows to specify the User Name for authentication.
Password: [String] (optional) It allows to specify the Password for authentication.
Note: This command is similar to the ‘Get’ command, as it uses a GET request, but allows managing files in a more convenient manner.
Put
Uploads data into the specified server.
URL: [String] The URL to be requested.
Request Headers: [String] (optional) The headers to apply to the request. Commands ‘Get Header’ or ‘Add Header’ can be used to manipulate this parameter.
Data: [String] The Data to send with the request.
Items: [String] (optional) It allows to specify the parameters for a URL (it supports special characters like #)
ItemsEncoding: [Enum] (optional) Specify the way to encode Items.
DefaultEncoding: Encode specific parameter like # in percent encoded form.
NoEncoding: specific parameters must be manually encoded (for example : -> %3A)
UserName: [String] (optional) It allows to specify the User Name for authentication.
Password: [String] (optional) It allows to specify the Password for authentication.
Note: This command sends a PUT request, which most servers do not allow.
For general upload mechanisms, including that of uploading files (such as HTML forms do), use the ‘Post’ command.
Delete
Sends a request to delete the data/document into the specified server..
URL: [String] The URL of the data/document to delete on the server.
Request Headers: [String] (optional) The headers to apply to the request. Commands ‘Get Header’ or ‘Add Header’ can be used to manipulate this parameter.
Items: [String] (optional) It allows to specify the parameters for a URL (it supports special characters like #)
ItemsEncoding: [Enum] (optional) Specify the way to encode Items.
DefaultEncoding: Encode specific parameter like # in percent encoded form.
NoEncoding: specific parameters must be manually encoded (for example : -> %3A)
UserName: [String] (optional) It allows to specify the User Name for authentication.
Password: [String] (optional) It allows to specify the Password for authentication.
Note: This feature is currently available for HTTP only (not supported in HTTPS).
Get Header
Get a specific Header from a list of Headers.
Header List: [String] The list of Headers.
Select By: [Enum] Defines the selection method within the list.
Name: select header by its name.
Index: select header by its index (in the device). Valid indexes start at 1.
Index: [Integer] Index of the Header (‘Select By’ should indicate Index).
Name: [String] Name of the Header (‘Select By’ should indicate Name).
Value: [String] Value of the Header.
Note: This command is a convenient command to manipulate the parameters ‘Request Header’ of some commands or the content of the variable ResponseHeader.
Add Header
Add a specific Header to a list of Headers.
Header List: [String] The list of Headers.
Name: [String] Name of the Header.
Value: [String] Value of the Header.
Note: This command is a convenient command to manipulate the parameters ‘Request Header’ of some commands or the content of the variable ResponseHeader.
Note: Each Headers are separted by ‘\r\n’ characters. This variable can be used in a Medialon List.
Each Header contains a name and a value which are separated by a ‘:’ character (ex: Connection:Keep-Alive).
Device Variables
Status
[Enum] Current status of the device.
“Ready”: The device is ready to accept a command.
“Busy”: A request has been sent and a Response is expected.
Error
[Enum] Current error status of the device.
“No Error”: No error condition. Note: When the HTTP protocol returns a redirect, no error will be reported
“Connection Refused Error”: The remote server refused the connection (the server is not accepting requests)
“Remote Host Closed Error”: The remote server closed the connection prematurely, before the entire reply was received and processed
“Host Not Found Error”: The remote host name was not found (invalid hostname)
“Timeout Error”: The connection to the remote server timed out
“Operation Canceled Error”: The operation was cancelled before it was finished.
“Ssl Handshake Failed Error”: The SSL/TLS handshake failed and the encrypted channel could not be established.
“Temporary Network Failure Error”: The connection was broken due to disconnection from the network, however the system has initiated roaming to another access point. The request should be resubmitted and will be processed as soon as the connection is re-established.
“Proxy Connection Refused Error”: The connection to the proxy server was refused (the proxy server is not accepting requests)
“Proxy Connection Closed Error”: The proxy server closed the connection prematurely, before the entire reply was received and processed
“Proxy Not Found Error”: The proxy host name was not found (invalid proxy hostname)
“Proxy Timeout Error”: The connection to the proxy timed out or the proxy did not reply in time to the request sent
“Proxy Authentication Required Error”: The proxy requires authentication in order to honour the request but did not accept any credentials offered (if any)
“Content Access Denied”: The access to the remote content was denied (similar to HTTP error 401)
“Content Operation Not PermittedError”: The operation requested on the remote content is not permitted
“Content Not Found Error”: The remote content was not found at the server (similar to HTTP error 404)
“Authentication Required Error”: The remote server requires authentication to serve the content but the credentials provided were not accepted (if any)
“Content ReSend Error”: The request needed to be sent again, but this failed for example because the upload data could not be read a second time.
“Protocol Unknown Error”: The Network Access layer cannot honor the request because the protocol is not known
“Protocol Invalid Operation Error”: The requested operation is invalid for this protocol
“Unknown Network Error”: An unknown network-related error was detected
“Unknown Proxy Error”: An unknown proxy-related error was detected
“Unknown Content Error”: An unknown error related to the remote content was detected
“Protocol Failure”: A breakdown in protocol was detected (parsing error, invalid or unexpected responses, etc.)
“Wrong File Path”: The path define in the ‘Download File’ command is not an existing directory
“File Can Not Be Created”: The downloaded file cannot be saved.
Response
[String] Contains the response to the last Request when properly sent and processed
ResponseHeaders
[String] Contains the headers of the response to the last Request when properly sent and processed.
Note: Each Headers are separated by ‘\r\n’ characters. This variable can be used in a Medialon List.
Each Header contains a name and a value which are separated by a ‘:’ character (ex: Connection:Keep-Alive).
Commands ‘Get Header’ or ‘Add Header’ can be used to manipulate this variable.
HTTPStatusCode
[Integer] Contains the HTTP Status Code delivered in the response to the last Request
DownloadProgress
[Integer] Indicates the download progress status of a ‘Download File’ command (from 0 to 100)
UploadProgress
[Integer] Indicates the upload progress status of a ‘Put’ command (from 0 to 100)
Revisions
V 6.0.0
Initial.
V 6.0.1
Fixed: MXM Commands may sometimes hang Manager while the command being executed.
V 6.0.2
Fixed: It is not possible to associate a variable to the ‘Select By’ and ‘Index (1-X)’ parameters from the ‘Get Header’ command.
V 6.1.0
Added: Compatibility for Overture CS.
V 6.1.1
Improved: Get command has a new parameter named ‘Items’ which allows to specify the parameters for a URL (it supports special characters like #).
V 6.1.2
Improved: Put, Post, Download File and Delete commands have a new parameter named ‘Items’ which allows to specify the parameters for a URL (it supports special characters like #).
Improved: Get, Put, Post, Download File and Delete commands have a new parameter named ‘ItemsEncoding’ which allows to specify the way to encode Items.
Added: Authentication is now supported.
V 6.7.0
Fixed: Sometimes, a crash can happen when the device is stopped or when the application is closed.
Improved: Support for High DPI displays (require Manager 6.7.0+ or Showmaster Editor 2.7.0+)
Changed: Compatibility for Manager 6.7.0 and Showmaster Editor 2.7.0
V 6.7.1
Fixed: It was not possible to unload dynamically the MXM.
Changed: Compatibility for Showmaster Editor 2.7.0
V 6.7.2
Fixed: Sometimes the MXM cannot be unloaded successfully.
V 6.7.3
Fixed: The MXM generates an exception while unloading if a Get/Post/Download File/Put/Delete command has been used.
Added: “Ignore SSL Errors” option has been added to the Setup dialog.