Inspirited by RESTFul architecture, A console application targeted to same goals would use a match of RESTful definitions.
For convenience, we name the imaginary console application as 'app'.
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.
Using HTTP Methods for RESTful Services
Method | Meaning |
|---|---|
POST | Create |
GET | Read |
PUT | Update/Replace |
DELETE | Delete |
PATCH | Update/Modify |
Code | Meaning |
|---|---|
200 | OK |
401 | Unauthorized |
404 | Not Found |
409 | Conflict if the resource already exists |
500 | Internal Exception |
Arguments:
Argument | Description |
|---|---|
username | The user name in the Basic Authentication |
password | The user name in the Basic Authentication |
For example: app --username username --password pwd We will implement authentication methods OAuth and OAuth later.
Method | Meaning |
|---|---|
HEAD | Return an empty json file for creating/updating |
POST | Create |
GET | Read |
PUT | Update/Replace |
DELETE | Delete |
For example: app --method get
Code | Meaning |
|---|---|
0 | OK |
401 | Unauthorized |
404 | Not Found |
409 | Conflict if the resource already exists |
500 | Internal Exception |
{
"status": 200,
"response" : {}
}