Skip to content

abdelhamidfg/quarkus-rest-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quarkus REST Example

This example shows a simple REST-API with intern H2 Database access running with Quarkus.

Technologies

  • Quarkus
  • Hibernate
  • H2 Database

Build

Run ./mvnw clean package or mvnw.cmd clean package (Windows) to build this project.

Run

java -jar target/quarkus-rest-example-1.0-runner.jar

REST call examples

Get all contacts

curl -X GET http://localhost:8080/api/contacts

Get single contact

curl -X GET http://localhost:8080/api/contacts/-1

Add contact

curl -X POST -H "Content-Type: application/json" -d '{"companyName":"J+J Doe Inc.","firstName":"Jane","lastName":"Doe"}' http://localhost:8080/api/contacts

Update contact

curl -X PUT -H "Content-Type: application/json" -d '{"companyName":"J+J Doe Inc.","firstName":"Jane Q.","lastName":"Doe"}' http://localhost:8080/api/contacts/1

Delete contact

curl -X DELETE http://localhost:8080/api/contacts/-1

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages