Skip to content

SamiOksanen/Back-end_for_Kuppilat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

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

Releases

No releases published

Packages

No packages published

Languages