Git Product home page Git Product logo

students's Introduction

A small RESTful Java Web Service, described on http://arantaday.com/the-modern-java-ecosystem.

To run it, you can just clone this repo and then run 'mvn tomcat:run' in the directory.

Some example interaction (via CURL):
# List the existing students (there are none)
~$ curl http://127.0.0.1:8080/student/rest/students
[]

# Create some fake students, and check that they now present
~$ curl -d "name=Shaneal&dob=015-28-1986&courses=CS-301,CS-401,CS-501" http://127.0.0.1:8080/student/rest/students
1
~$ curl -d "name=John&dob=01-02-1984&courses=CS-101,ENG-201,MATH-304" http://127.0.0.1:8080/student/rest/students
2
~$ curl http://127.0.0.1:8080/student/rest/students
[1,2]
~$ curl http://127.0.0.1:8080/student/rest/students/2
{"uid":2,"name":"John","dateOfBirth":441878400000,"enrolled":true,"courses":["CS-101","ENG-201","MATH-304"]}
~$ curl http://127.0.0.1:8080/student/rest/students/1
{"uid":1,"name":"Shaneal","dateOfBirth":543916800000,"enrolled":true,"courses":["CS-301","CS-401","CS-501"]}

# Delete one of the students, and verify that it is deleted
~$ curl -X DELETE http://127.0.0.1:8080/student/rest/students/1
true
~$ curl http://127.0.0.1:8080/student/rest/students
[2]
~$ curl http://127.0.0.1:8080/student/rest/students/2
{"uid":2,"name":"John","dateOfBirth":441878400000,"enrolled":true,"courses":["CS-101","ENG-201","MATH-304"]}
~$ curl -s -w "%{http_code}\\n" http://127.0.0.1:8080/student/rest/students/1 -o /dev/null
404

students's People

Contributors

omnipresent avatar smanek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.