http methods & restful api methods
http methods & restful api methods
超文本传输协议(HTTP)是用于传输超媒体文档(例如HTML)的
应用层协议
https://developer.mozilla.org/en-US/docs/Web/HTTP
https://developer.mozilla.org/en-US/docs/Web/HTTP/Overview




https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods
https://en.wikipedia.org/wiki/List_of_HTTP_status_codes
HTTP Methods (9 种)
https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods

CONNECT & TRACE
https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/CONNECT
https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/TRACE
HTTP Request Methods (7 种)
GET
POST
PUT
PATCH
DELETE
HEAD
OPTIONS
RESTful API
https://www.restapitutorial.com/lessons/httpmethods.html

REST Principles and Architectural Constraints
https://restfulapi.net/rest-architectural-constraints/
Uniform interface
Client–server
Stateless
Cacheable
Layered system
Code on demand (optional)
统一的界面
客户端服务器
无状态
可缓存的
分层系统
按需代码(可选)
Fetch API & OPTIONS
CORS 预检请求
https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#Preflighted_requests
CORS 简单请求

refs
https://restful-api-design.readthedocs.io/en/latest/methods.html

https://restfulapi.net/http-methods/
CORS 原理
- white list
HTTP status code
100 Continue
101 Switching Protocols
103 Early Hints
200 OK
201 Created
202 Accepted
203 Non-Authoritative Information
204 No Content
205 Reset Content
206 Partial Content
300 Multiple Choices
301 Moved Permanently
302 Found
303 See Other
304 Not Modified
307 Temporary Redirect
308 Permanent Redirect
400 Bad Request
401 Unauthorized
402 Payment Required
403 Forbidden
404 Not Found
405 Method Not Allowed
406 Not Acceptable
407 Proxy Authentication Required
408 Request Timeout
409 Conflict
410 Gone
411 Length Required
412 Precondition Failed
413 Payload Too Large
414 URI Too Long
415 Unsupported Media Type
416 Range Not Satisfiable
417 Expectation Failed
418 I'm a teapot
422 Unprocessable Entity
425 Too Early
426 Upgrade Required
428 Precondition Required
429 Too Many Requests
431 Request Header Fields Too Large
451 Unavailable For Legal Reasons
500 Internal Server Error
501 Not Implemented
502 Bad Gateway
503 Service Unavailable
504 Gateway Timeout
505 HTTP Version Not Supported
506 Variant Also Negotiates
507 Insufficient Storage
508 Loop Detected
510 Not Extended
511 Network Authentication Required
xgqfrms 2012-2020
www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!
http methods & restful api methods的更多相关文章
- Restful API和传统的API的区别
一.功能区别 Restful API是当作资源的唯一标识符,而传统是实现某某功能 如:/api/getList/1 and /api/getList?page=1 二.methods多样性 Restf ...
- HTTP methods 与 RESTful API
Note GET, primarily used to select resources. Other options for an API method include: POST, primari ...
- Restful Api 最佳实践
Web APIs has become an very important topic in the last year. We at M-Way Solutions are working ever ...
- 使用Flask设计带认证token的RESTful API接口[翻译]
上一篇文章, 使用python的Flask实现一个RESTful API服务器端 简单地演示了Flask实的现的api服务器,里面提到了因为无状态的原则,没有session cookies,如果访问 ...
- RESTful API URI 设计的一些总结
非常赞的四篇文章: Resource Naming Best Practices for Designing a Pragmatic RESTful API 撰写合格的 REST API JSON 风 ...
- 【转】最佳Restful API 实践
原文转自:https://bourgeois.me/rest/ REST APIs are a very common topic nowaday; they are part of almost e ...
- 利用 Django REST framework 编写 RESTful API
利用 Django REST framework 编写 RESTful API Updateat 2015/12/3: 增加 filter 最近在玩 Django,不得不说 rest_framewor ...
- spring3 的restful API RequestMapping介绍
原文链接:http://www.javaarch.net/jiagoushi/694.htm spring3 的restful API RequestMapping介绍 在spring mvc中 @R ...
- 基于Node的PetShop,RESTful API以及认证
前篇 - 基本认证,用户名密码 后篇 - OAuth2 认证 由于宠物店的业务发展需要,我们需要一种更加便捷的方式来管理日益增多的宠物和客户.最好的方法就是开发一个APP,我可以用这个APP来添加.更 ...
随机推荐
- Zerotier在windows下实现内网远程桌面
Zerotier实现内网远程桌面 使用背景 实验室设备条件过于恶劣 向日葵在有些场景下会莫名崩溃,或者画面不动. Teamviewer免费版在之前用的时候出现过疑似商业行为被断连,github上寻解决 ...
- 【十天自制软渲染器】DAY 03:画一个三角形(向量叉乘算法 & 重心坐标算法)
如果你喜欢我写的文章,可以把我的公众号设为星标 ,这样每次有更新就可以及时推送给你啦. 前面两天画了点和线,今天我们来画一个最简单也是最强大的面--三角形. 本文主要讲解三角形绘制算法的推导和思路(只 ...
- Java面试(解答题二)
1.一个用户具有多个角色,请查询出该表中具有该用户的所有角色的其他用户.备注:用户表:tb,角色字段为role,主键为id.请写出sql语句. 解答: 2.概述MVC体系结构 解答: MVC包括三类对 ...
- ajax带checkbox选择值到后台
function togglefun(checkbox){//全选 $('input[name=cids]').prop('checked', $(checkbox).prop('checked')) ...
- shell(shell函数、shell正则表达式)
本章内容 shell函数 shell正则表达式 1.shell函数 linux shell 可以用户定义函数,然后在shell脚本中可以随便调用. 格式: funname () { CMD #函数体 ...
- TCP/IP__TCP协议IP协议&IP地址
IP协议(Internet Protocol) 1. 定位:计算机网络间相互连接进行通信而定义的协议.在因特网中,它是能使连接到网上的所有计算机网络实现相互通信的一套规则,规定了计算机在因特网上进 ...
- Java基础进阶
Java基础进阶J Object类 hashcode() toString() clone() getClass() notify() wait() equals() Random类 生成 随机数 U ...
- Codeforces Round #673 (Div. 2) D. Make Them Equal(数论/构造)
题目链接:https://codeforces.com/contest/1417/problem/D 题意 给出一个大小为 $n$ 的正整数数组 $a$ ,每次操作如下: 选择 $i,j$ 和 $x$ ...
- CSAPP_BombLab实验报告
Lab_2实验报告 目录 Lab_2实验报告 屏幕截图 考察内容 各题答案 bomb1 bomb2 bomb3 bomb4 bomb5 bomb6 secret_phase 解题思路 bomb1 bo ...
- 2019牛客多校 Round1
Solved:4 Rank:143 A Equivalent Prefixes 题意:求一个最大的r满足在A,B两个数组中1,r里所有的子区间RMQ相等 题解:单调队列秒 #include <b ...