Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/samioksanen/back-end_for_kuppilat

REST API made with Java Spring for PhoneGap app Kuppilat
https://github.com/samioksanen/back-end_for_kuppilat

backend java javaee rest rest-api restful-api spring spring-mvc

Last synced: 5 days ago
JSON representation

REST API made with Java Spring for PhoneGap app Kuppilat

Awesome Lists containing this project

README

        

# Back-end for Kuppilat
-------------------
Demonstrates really simple way the capabilities of the Spring MVC web framework and the RESTful web service.
After reviewing this project, you should have a good understanding of what the basics of Spring MVC and REST can do and get a feel for how easy it is to use.

Returns json data about bar reviews:

* **URL**

http://localhost:8080/arvostelut/kaikki

* **Method:**

`GET` | `POST`

* **Success Response:**

* **Code:** 200

**Content (example):** `{ id : 17, paikka : "Some Bar", paiva : "20.05.2017", arvosana : "3", kuvaus : "Some description about the bar" }`

* **Error Response:**

* **Code:** 404 NOT FOUND

OR

* **Code:** 401 UNAUTHORIZED

* **Sample Call:**

```javascript
$.ajax({
url: "http://localhost:8080/arvostelut/kaikki",
type: "GET",
dataType: "json",
contentType: "application/json; charset=utf-8",
success : function(r) {
console.log(r);
}
});
```