Skip to content

Latest commit

 

History

History
16 lines (13 loc) · 1.68 KB

File metadata and controls

16 lines (13 loc) · 1.68 KB

backend-client-app

Contains a Backend App that lets you get, add and delete Contacts using the multiplatform-rest-lib.

How to compile & run?

  1. To build this app you'll need to compile contacts-client-lib first, as explained here.
  2. contacts-client-lib requires you to set the base url of the contacts-backend-app. You can configure this in application.properties.
  3. Open the project in your favorite IDE and run the main function from Application.kt.

You can now perform GET, POST and DELETE requests to /api/contact-descriptions. E.g:

Request cURL Screenshot
Get curl localhost:8181/api/contact-descriptions/1 Contacts - Backend Client - Get
Get all curl localhost:8181/api/contact-descriptions Contacts - Backend Client - Get all
Post curl -X POST -H "Content-Type: application/json" -d '{"description": "Id[5] Name[Luigi] Number[8976-3245]"}' localhost:8181/api/contact-descriptions Contacts - Backend Client - Post
Delete curl -X DELETE localhost:8181/api/contact-descriptions/5 -v Contacts - Backend Client - Delete