HTTP GET Handler Block¶
How this block appears in a Simulink model?¶
What can be configured?¶
Configuration Parameter | Selectable Option/Value | Description |
---|---|---|
Name of the handler | Specify the name for the current handler. It should not be repeated. | |
URI | Specify the uri for the handler. In case the enable waildcard for this handler is enabled specify the base uri here. | |
Enable wildcard for this handler | Check--Uncheck | Enable or disable the wildcard for this current handler. |
Number of requests | 1 to 12 | Number of requests handle using the current handler. This will be always 1 when the wildcard is false in HTTP Server Setup block. |
If request is | Specify the request to be handle (uri) | |
Compare the whole request | Check--Uncheck | Compare the request uri with the specified partially or fully |
Set header type | .html--.css--.png--.ico--.txt--.js--.ttf--.woff2--.json | Select the correct data type of the response data |
Serve data from | SD card--Static text input--Dynamic text input | The data source. Whether the response data from the sd card or static text from the mask text box or dynamic text from input port |
File location | Full file path. This option is enabled when the data is served from the SD card | |
Contains .gz compressed files | Check--Uncheck | Check, when the files are gz compressed files |
Text input | This enables when the data is served from a static text input. Insert the data on the text area |
When to use this block?¶
This block is used when there are GET requests from the client.
How does this block work?¶
This block handles the GET requests from the client. Before using this block, first initialize the server using HTTP Server Setup Block. The data to the input ports should be in string format.
Demo¶
Previous : HTTP Server Setup Block
Next : HTTP POST Handler Block