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/

  1. Uniform interface

  2. Client–server

  3. Stateless

  4. Cacheable

  5. Layered system

  6. 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 原理

  1. white list

HTTP status code


  1. 100 Continue
  2. 101 Switching Protocols
  3. 103 Early Hints
  4. 200 OK
  5. 201 Created
  6. 202 Accepted
  7. 203 Non-Authoritative Information
  8. 204 No Content
  9. 205 Reset Content
  10. 206 Partial Content
  11. 300 Multiple Choices
  12. 301 Moved Permanently
  13. 302 Found
  14. 303 See Other
  15. 304 Not Modified
  16. 307 Temporary Redirect
  17. 308 Permanent Redirect
  18. 400 Bad Request
  19. 401 Unauthorized
  20. 402 Payment Required
  21. 403 Forbidden
  22. 404 Not Found
  23. 405 Method Not Allowed
  24. 406 Not Acceptable
  25. 407 Proxy Authentication Required
  26. 408 Request Timeout
  27. 409 Conflict
  28. 410 Gone
  29. 411 Length Required
  30. 412 Precondition Failed
  31. 413 Payload Too Large
  32. 414 URI Too Long
  33. 415 Unsupported Media Type
  34. 416 Range Not Satisfiable
  35. 417 Expectation Failed
  36. 418 I'm a teapot
  37. 422 Unprocessable Entity
  38. 425 Too Early
  39. 426 Upgrade Required
  40. 428 Precondition Required
  41. 429 Too Many Requests
  42. 431 Request Header Fields Too Large
  43. 451 Unavailable For Legal Reasons
  44. 500 Internal Server Error
  45. 501 Not Implemented
  46. 502 Bad Gateway
  47. 503 Service Unavailable
  48. 504 Gateway Timeout
  49. 505 HTTP Version Not Supported
  50. 506 Variant Also Negotiates
  51. 507 Insufficient Storage
  52. 508 Loop Detected
  53. 510 Not Extended
  54. 511 Network Authentication Required


xgqfrms 2012-2020

www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!


http methods & restful api methods的更多相关文章

  1. Restful API和传统的API的区别

    一.功能区别 Restful API是当作资源的唯一标识符,而传统是实现某某功能 如:/api/getList/1 and /api/getList?page=1 二.methods多样性 Restf ...

  2. HTTP methods 与 RESTful API

    Note GET, primarily used to select resources. Other options for an API method include: POST, primari ...

  3. Restful Api 最佳实践

    Web APIs has become an very important topic in the last year. We at M-Way Solutions are working ever ...

  4. 使用Flask设计带认证token的RESTful API接口[翻译]

    上一篇文章, 使用python的Flask实现一个RESTful API服务器端  简单地演示了Flask实的现的api服务器,里面提到了因为无状态的原则,没有session cookies,如果访问 ...

  5. RESTful API URI 设计的一些总结

    非常赞的四篇文章: Resource Naming Best Practices for Designing a Pragmatic RESTful API 撰写合格的 REST API JSON 风 ...

  6. 【转】最佳Restful API 实践

    原文转自:https://bourgeois.me/rest/ REST APIs are a very common topic nowaday; they are part of almost e ...

  7. 利用 Django REST framework 编写 RESTful API

    利用 Django REST framework 编写 RESTful API Updateat 2015/12/3: 增加 filter 最近在玩 Django,不得不说 rest_framewor ...

  8. spring3 的restful API RequestMapping介绍

    原文链接:http://www.javaarch.net/jiagoushi/694.htm spring3 的restful API RequestMapping介绍 在spring mvc中 @R ...

  9. 基于Node的PetShop,RESTful API以及认证

    前篇 - 基本认证,用户名密码 后篇 - OAuth2 认证 由于宠物店的业务发展需要,我们需要一种更加便捷的方式来管理日益增多的宠物和客户.最好的方法就是开发一个APP,我可以用这个APP来添加.更 ...

随机推荐

  1. 提供个HDFS的目录的路径,对该目录进行创建和删除操作。创建目录时,如果目录 文件所在目录不存在则自动创建相应目录;删除目录时,由用户指定当该目录不为空时是否还删 除该目录

    import java.io.IOException; import java.util.Scanner; import org.apache.hadoop.fs.*; public class G_ ...

  2. 用xmind设计用例:

    注意一个原则:清晰明了,简单高效 注意不要写成需求分析,从测试的角度对场景进行分类管理 注意点: 1.思维导图重要的是逻辑清晰归类,注意有不要太多具体的操作步骤 举个例子(来源:https://www ...

  3. 纯手工撸一个vue框架

    前言 vue create 真的很方便,但是很多人欠缺的是手动撸一遍.有些人离开脚手架都不会开发了. Vue最简单的结构 步骤 搭建最基本的结构 打开空文件夹,通过 npm init 命令生成pack ...

  4. 类型检查 Type Checking 一些编程语言并不安全 类型化语言的优点 定型环境 (符号表) 断言的种类

    Compiler http://staff.ustc.edu.cn/~bjhua/courses/compiler/2014/ http://staff.ustc.edu.cn/~bjhua/cour ...

  5. Python学习【第9篇】:python中的局部变量与全局变量

    1.全局变量 全局变量定义后可被下面所有函数进行调用 例子: name = "xiao"def chang_name(): print("chang_name" ...

  6. luoguP2657 [SCOI2009] windy 数

    目录 luoguP2657 [SCOI2009] windy 数 简述题意: Solution: luoguP2657 [SCOI2009] windy 数 简述题意: 不含前导零且相邻两个数字之差至 ...

  7. K8s 一、(1、容器基本概念 2、k8s基本概念 )

    1.容器基本概念 容器其实就是一种特殊的进程,容器是一个 '单进程'模型. Namespace :隔离 Namespace 技术实际上修改了应用进程看待整个计算机"视图",即它的& ...

  8. centos6.5升级gcc 4.4.7为最新版4.9.1

    ==================本方法切实可行===桌面版不建议用.centos============================== 1.下载源码包 我的下载  gcc-4.9.1.tar ...

  9. msf+cobaltstrike联动(二):把cs中的机器spwan给msf

    前提:CS已经获取到session,可以进入图形化管理机器,现在需要使用msf进行进一步渗透,需要msf的metepreter. 开启msf msf设置监听 msf > use exploit/ ...

  10. HBase协处理器加载过程(1.2.x)

    一.首先来看ObserverCoprocessor:1.观察者协处理器的静态加载的配置是在hbase-site.xml中配置如下属性:通过hbase.coprocessor.region.classe ...