2021年7月18日
啥是Restful??他是用来干嘛的?
最近刷了一些jd,发现总提到这个词,后来查了一下 发现这块对于业务开发来说还是蛮重要的。
定义:RESTFUL是一种网络应用程序的设计风格和开发方式,基于HTTP,可以使用XML格式定义或JSON格式定义。
翻译过来就是:用 URL 定位资源,用 HTTP 动词(GET,POST,DELETE,PUT)描述操作。
RESTful架构是对MVC架构改进后所形成的一种架构,通过使用事先定义好的接口与不同的服务联系起来。
在RESTful架构中,浏览器使用POST,DELETE,PUT和GET四种请求方式分别对指定的URL资源进行增删改查操作。
因此,RESTful是通过URI实现对资源的管理及访问,具有扩展性强、结构清晰的特点。
(vue/React)MVVM : RESTful架构将服务器分成前端服务器和后端服务器两部分,前端服务器为用户提供无模型的视图;后端服务器为前端服务器提供接口。
浏览器向前端服务器请求视图,通过视图中包含的AJAX函数发起接口请求获取模型。项目开发引入RESTful架构,利于团队并行开发。
在RESTful架构中,将多数HTTP请求转移到前端服务器上,降低服务器的负荷,使视图获取后端模型失败也能呈现。但RESTful架构却不适用于所有的项目,当项目比较小时无需使用RESTful架构,项目变得更加复杂。
知乎上另一大神对 RESTful 的解释,相比于 Ivony 多了一句话,他用了三句话来描述:
- 看 Url 就知道要什么
- 看 http method 就知道干什么
- 看 http status code 就知道结果如何
http 状态码有 100 多种,我们并不需要全部用到,只需要了解其中常用的就可以了
- 200 – OK – 一切正常
- 201 – OK – 新资源已经被创建
- 204 – OK – 资源删除成功
- 304 – 没有变化,客户端可以使用缓存数据
- 400 – Bad Request – 调用不合法,确切的错误应该在 error payload 中描述
- 401 – 未认证,调用需要用户通过认证
- 403 – 不允许的,服务端正常解析和请求,但是调用被回绝或者不被允许
- 404 – 未找到,指定的资源不存在
- 422 – 不可指定的请求体 – 只有服务器不能处理实体时使用,比如图像不能被格式化,或者重要字段丢失
- 500 – Internal Server Error – 标准服务端错误,开发人员应该尽量避开这种错误
what is a major disadvantage of using over-the-counter (otc) medications?
References:
https://dreevoo.com
References:
Zoome Stay Casino review
software developers
References:
Michigan casinos
References:
https://graph.org/Level-Up-Casino-Pro-Tips-for-Maximum-Wins-04-20
References:
Orleans casino las vegas
References:
https://mgm-grand-casino-las-vegas-nevada.online-spielhallen.de/
References:
Nashville casino
References:
https://best-bitcoin-casino.online-spielhallen.de/
References:
Bergisch Gladbach
References:
https://cache-creek-casino.online-spielhallen.de/
References:
Düsseldorf
References:
https://hard-rock-casino-hotel-hollywood-florida.online-spielhallen.de/
References:
Solingen
References:
https://casino-de-valencia.online-spielhallen.de/
References:
Mülheim an der Ruhr
References:
https://betsson-mobile-casino.online-spielhallen.de/
References:
Gala casino nottingham
References:
https://graph.org/Is-Neteller-Legit-Or-Not-04-27
References:
Tulsa casinos
References:
https://graph.org/What-Casino-Has-Instant-Payout-Without-KYC-04-27
References:
Catalina casino
References:
http://tools.refinecolor.com/paulettepowe24
References:
Casino cleveland https://findhotbeds.com
References:
Century casino https://alyssapobt741684.theblogfairy.com
References:
Chateau richelieu easybookmarking.com
References:
Casino spiele casino one deutschland
References:
Biggest casino in the world Bitcoin Slots
References:
Fitzgerald casino tunica atpo.ca
Arrest strip search videoBusty nurses porn clipFree naked picture adultVintage motocross
bikes 4 saleFucking asshole picturesRecipe for holiday turkey breast roastWho is the redhead woman on the
turbo tax commercial4 belladonna fanatic fetishHousewife nude picsBbw tiffany
star pics xnxx Muscle gay hunksTeen clothing resale paBikini spring
breakInterracial pregnant white wivesMartial arts in the vulvaSex cartoon moviesHairy arm pit commercialPriya rai facial free
https://xxx.gizmoporno.com/ Pussy clip w out sighn upNaked greetersBlack 3m command stripsThe nazi homosexualsAsian american churchesTeen choiExtremely young boys nudeParis hilton new nude xnxx Baby powder fetishMontsers ball
sex sceneSan diego brian adult bookstore ownerProflex weather stripGay nuedAmateur individualFree
asian interracial lucy lee