RESTful Console Application

RESTful Console Application

Introduction

Inspirited by RESTFul architecture, A console application targeted to same goals would use a match of RESTful definitions.

Design

For convenience, we name the imaginary console application as 'app'.

RESTful WebService objects

  • Authentication

    Request header: Authentication

    Value: "Basic " or ":"
Property Description
username The user name in the Basic Authentication
password The user name in the Basic Authentication

For authentication methods OAuth and OAuth, we will consider then later.

  • Headers

    Headers are a list of header in key-value form.

    See.

  • Method

Using HTTP Methods for RESTful Services

Method Meaning
POST Create
GET Read
PUT Update/Replace
DELETE Delete
PATCH Update/Modify
  • Error Code
Code Meaning
200 OK
401 Unauthorized
404 Not Found
409 Conflict if the resource already exists
500 Internal Exception
  • URL

    http(s)

上一篇:vue实例讲解之vue-router的使用


下一篇:33. Search in Rotated Sorted Array