Download Wildfly.
Uncompress it.
Start WildFly:
./wildfly-8.2.0.Final/bin/standalone.sh
Compile, test and deploy this project:
mvn clean package test wildfly:deploy
In the main path you will find your normal web project. In this case you have a REST Console so that you can play with the REST API: http://localhost:8080/RESTExample/
In the /api/ you find the root path where all the API is located for all the services. For now there's only one service, that is the purchase simulation: http://localhost:8080/RESTExample/api/
The service for the purchase simulation is in the /api/decision/ So far there's only two operations supported: GET and POST.
GET on the main path of /api/decisions/ will return all the users. GET on a concrete user will return the current balance of that user: RESTExample/api/decision?email=[email protected]
POST : You can add a new purchase for a new user that will be identified by its email. It expects a JSON object with the following format: {"email":"[email protected]","first_name":"Eduard","last_name":"Cespedes","amount":300}
- (Author) Eduard Cespedes Borras
BSD. See the LICENSE file at the root of this repository.