Skip to content

GrapeBaBa/rest-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rest API

REST

Definition: https://en.wikipedia.org/wiki/Representational_state_transfer

Note:

  • An remote invocation method
  • Key
  1. Resource: URI/URL
  2. HTTP method: POST, PUT, DELETE, PUT etc
  3. HTTP status: 200. 201, 204, 400, 404, 409, 500 etc
  • Versus SOAP
  1. Resource VS Action
  2. JSON VS SOAP
  • Design API
  1. PATH PARAM
  2. QUERY PARAM

SPRING REST USAGE

Example: https://github.com/GrapeBaBa/rest-demo

./mvnw eclipse:eclipse or ./mvnw idea:idea
./mvnw spring-boot:run

Note:

  • Error response
  • HTTP status code
  • JSON serialization

Thinking problems

  • Pagination query API design
  • File upload API design
  • Multiple items deletion API design

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published