Project

General

Profile

HTTP POST 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.
Output request data Check--Uncheck Enable this option to get the POST request body from the output port.
If request is Specify the request to be handle (POST request body)
Compare the whole request Check--Uncheck Compare the POST request body 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 POST requests from the client.

How does this block work?

This block handles the POST 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

HTTP Server demo

Previous : HTTP GET Handler Block
Next : xTaskCreate Block

Also available in: PDF HTML TXT