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''.
© 2001-2019 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.