Initializing help system before first use

HTTP

A Mosel model can communicate with external components via HTTP requests. It can act as a client sending HTTP queries (GET, POST, PUT or DELETE) or as a web service by starting the integrated HTTP server.

HTTP client functionality in Mosel can be configured to work synchronously (a request waits for the answer from the server) or asynchronously (functions sending requests return immediatly and termination messages are sent via separate event messages). Other configuration settings involve, for example, the maximum number of simultaneous requests accepted by a server or the TCP port to be used by remote connections.

The example file foliohttpsrv.mos starts up an HTTP server that accepts HTTP requests triggering the execution of the optimization model in file folioxml.mos. The model foliohttpclient.mos shows what the corresponding HTTP client might look like, it exchanges input and result data in XML-format with the HTTP server and displays the solution. Both examples are located in the directory examples\getting_started\Mosel of your Xpress installation.

Further information

  • Documentation: Section `mmhttp' of the ``Xpress Mosel Language Reference Manual''.