Skip to content

Sollimann/kotlin-spring-boot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Run the API

type the following in the root directory of the application and Sptring Boot will startup. After that you can interact with the API in another terminal.

$ mvn spring-boot:run

adds a new customer

$ curl -H "Content-Type: application/json" -X POST -d '{
    "firstName": "Kristoffer",
    "lastName": "Solberg"
}'  http://localhost:8080/customers 

retrieves all customers

$ curl http://localhost:8080/customers

updates customer with id 1

$ curl -H "Content-Type: application/json" -X PUT -d '{
    "id": 1,
    "firstName": "Kristoffer",
    "lastName": "Rakstad"
}'  http://localhost:8080/customers/1

deletes customer with id 1

$ curl -X DELETE http://localhost:8080/customers/1

About

A RESTful API with Spring Boot and Maven in Kotlin.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages