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" : {}
}
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有