HTTP

This section shows how to make applications communicate using HTTP. For now, 4diac supports client http (get, put, post) and server (get). You should use the client and server FBs according to your needs. Publish and Subscribe blocks are currently not supported. All RDs and SDs data output/inputs should be connected to STRING types for it to work.

Configuration

Forte must be compiled from source code for the HTTP module to work. Follow the steps to build your own FBs. In the step 3 where the features to be compiled are selected, select also FORTE_COM_HTTP. Then follow the same procedure, compile forte, et voilà, you have HTTP support on your Forte.

Client

Type of FB

PARAM

http[IP:PORT/PATH?PARAMETERS; POST | PUT | GET ;content-type;response-code]

Mandatory

Optional

Examples

Server

Type of FB

PARAM

http[PATH]

The server FB will trigger an event when the PATH is accessed with GET request. If parameters are provided, they should match the number of RDs in the FB and should be of type (name=value&....). The "&" should be used to define more than one parameter. The name is actually not used. The values are stored in the RDs in the order they arrived and treated as STRINGs.

Notes

Where to go from here?

Go back to Protocols index:

Communication Index

If you want to go back to the Start Here page, we leave you here a fast access

Start Here page

Or Go to top