Giter VIP home page Giter VIP logo

wudixm / restful Goto Github PK

View Code? Open in Web Editor NEW

This project forked from samsung/restful

0.0 1.0 0.0 4.11 MB

Suggesting standard and optimized codes for RESTful API including filter/annotator for allowing user access and validating input data, user management, data management and some utils such as protecting data using 128/256-bit AES encryption.

License: Other

Java 54.07% HTML 43.79% CSS 0.14% JavaScript 2.00%

restful's Introduction

RESTful

Suggesting the codes for RESTful API including filter/annotator for allowing user access and validating input data, user management, data management and some utils such as protecting data using 128/256-bit AES encryption and so on.

Please take a look at readme to see release note.

Guide

The followings are quick guides:
A. Preparing development environment
B. Quick guide how to run RESTful using this project
C. Customizing for your project (in progress)

Usage

html

User
Note

Restful

User
// Creating a user
POST /restful/api/user/signup
Content-Type: application/json
{
  "name": "axpower",
  "pwd": "*****",
  "username": "RESTful",
  "role": "User"
}

// Signing in
POST /restful/api/user/signin
Content-Type: application/json
{
  "name": "axpower",
  "pwd": "*****"
}

// Signing out
GET /restful/api/user/signout
Content-Type: application/json

// Retrieving my information 
GET /restful/api/user/profile
Content-Type: application/json

// Updating a user
PUT /restful/api/user
Content-Type: application/json
{
  "name": "axpower",
  "username": "Web service"
}

// Deleting a user
DELETE /restful/api/user
Content-Type: application/json
{
  "name": "axpower"
}

// Retrieving a user (admin only)
GET /restful/api/user/ax
Content-Type: application/json

// Retrieving a list of user with paging and search query (admin only)
GET /restful/api/user/list 
GET /restful/api/user/list?pn=1
GET /restful/api/user/list?pn=1&q=ax
Content-Type: application/json
Note
// Creating a note
POST /restful/api/note
Content-Type: application/json
{
  "subject": "Hello",
  "content": "Nice to meet you!"
}

// Updating a note
PUT /restful/api/note
Content-Type: application/json
{
  "idx": 1,
  "subject": "Hello",
  "content": "It's really nice to meet you."
}

// Deleting a note
DELETE /restful/api/note
Content-Type: application/json
{
  "idx": 1
}

// Retrieving a note
GET /restful/api/note/1
Content-Type: application/json

// Retrieving a list of note with paging and search query
GET /restful/api/note/list 
GET /restful/api/note/list?pn=1
GET /restful/api/note/list?pn=1&q=hello
Content-Type: application/json

restful's People

Contributors

axpower avatar yunjihwan avatar heesikjeon avatar jungsuplee avatar seo-young avatar eangkiller avatar

Watchers

James Cloos 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.