Skip to content

VanDavv/Pat2016_Lukasz_Pilatowski

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pat2016_Lukasz_Pilatowski

Prerequisites:

Building with maven

    mvn -T4 clean package

Running

java MyApplication.class

Testing

  • Create new actor

      curl -v http://localhost:8080/actors \
      	-H "Content-Type: application/json" \
      	-d '{"name":"Rowan Atkinson", "birthDate":"06-01-1955"}'
    
  • Create new movie

      curl -v http://localhost:8080/movies \
      	-H "Content-Type: application/json" \
      	-d ' {
                    "movieName": "test" ,
                    "actors": [
                               {
                                "name" : "Rowan Atkinson",
                                "birthDate" : "06-01-1955"
                               }
                              ]
      	     }'
    
  • Fetch all actors

      curl -v http://localhost:8080/actors
    
  • Fetch all movies

      curl -v http://localhost:8080/movies
    
  • Fetch one actor

      curl -v http://localhost:8080/actors/{id}
    
  • Fetch one movie

      curl -v http://localhost:8080/movies/{id}
    
  • Update actor

      curl -XPUT http://localhost:8000/actors/{id} \
      -H "Content-Type: application/json" \
      -d '{/*updated actor data*/}'
    
  • Update movie

      curl -XPUT http://localhost:8000/movies/{id} \
      -H "Content-Type: application/json" \
      -d '{/*updated movie data*/}'
    
  • Delete actor

      curl -XDELETE http://localhost:8000/actors/{id}
    
  • Delete movie

      curl -XDELETE http://localhost:8000/movies/{id}
    

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published