24-rest_mt

This sample demonstrates the use of the Web Services REST API with the HTTP server.

How to Run

See instructions here on how to build this and other samples on your development platform. Once built, the sample can be run from the \target\bin directory:

 
    24_rest_mt.exe
     

But it is more instructive to run it in your development environment debugger, stepping through the code.

The 24_rest_mt application loads sample data into a local in-memory database then: creates a REST server instance, adds and initializes the api/db service, and starts the REST server. The application displays the server host address and port number the waits for client requests until the user types ENTER to terminate the server.

To view the REST response run the Python client from \samples\native\core\24-rest directory:

 
    python restclient.py
     

Related Topics Link IconRelated Topics(See page Python Samples for instruction on running Python samples.)