Skip to content

haduart/JavaEE-REST-Example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

REST API Example with Wildfly

Usage

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}

Contributors

License

BSD. See the LICENSE file at the root of this repository.

About

Example project of a REST web project done in standard JavaEE

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages