Discover restful api design tutorial, include the articles, news, trends, analysis and practical advice about restful api design tutorial on alibabacloud.com
Source: http://www.ruanyifeng.com/blog/2014/05/restful_api.htmlThe Web application is divided into two parts, front end and back end. The current trend is the emergence of the front-end equipment (mobile phones, tablets, desktop computers, other special equipment ...). )。Therefore, there must be a unified mechanism to facilitate the communication of different front-end devices to the backend. This led to the popularity of API architecture, and even th
NanyiDate: May 22, 2014The Web application is divided into two parts, front end and back end. The current trend is the emergence of the front-end equipment (mobile phones, tablets, desktop computers, other special equipment ...). )。Therefore, there must be a unified mechanism to facilitate the communication of different front-end devices to the backend. This led to the popularity of API architecture, and even the "
NanyiDate: May 22, 2014The Web application is divided into two parts, front end and back end. The current trend is the emergence of the front-end equipment (mobile phones, tablets, desktop computers, other special equipment ...). )。Therefore, there must be a unified mechanism to facilitate the communication of different front-end devices to the backend. This led to the popularity of API architecture, and even the "
The Web application is divided into two parts, front end and back end. The current trend is the emergence of the front-end equipment (mobile phones, tablets, desktop computers, other special equipment ...). )。Therefore, there must be a unified mechanism to facilitate the communication of different front-end devices to the backend. This led to the popularity of API architecture, and even the "API first"
Restful API Design GuideNext I will introduce the design details of the RESTful API and discuss how to design a reasonable and useful APIFirst, the agreementThe
provider. If you authorize access to allow consumers to write things up on your timeline, there is no need to provide your Facebook login information.OAuth is not appropriate for Client/server's RESTful API, and is typically used in your RESTful API to allow third-party applications (consumers) to access.The above exa
The Web application is divided into two parts, front end and back end. The current trend is the emergence of the front-end equipment (mobile phones, tablets, desktop computers, other special equipment ...). )。Therefore, there must be a unified mechanism to facilitate the communication of different front-end devices to the backend. This led to the popularity of API architecture, and even the "API first"
1. If you have already begun to reach out to a friend of the RESTful API design approach, you should first have a general understanding of HTTP/HTTPS, although it has nothing to do with restful APIs. However, to increase the security of the site is very important, here is related to whether to expose the
authentication mechanism is also login, issue the key to the client, and then each time the client sends the request through the JWT algorithm rules to assemble JWT Auth Header, server side for authentication.The principle of Web authorization authentication is original aim, all the same.It's just a JWT, a set of authentication protocols. The format is Header. Payload. Signature. Like Xxxxx.yyyyy.zzzzz. The signature content is a Header + Payload + Secret encrypted by the HMAC SHA256 algorithm.
Excerpt from: Http://www.ruanyifeng.com/blog/2014/05/restful_api http://www.ruanyifeng.com/blog/2011/09/restful.htmlThe Web application is divided into two parts, front end and back end. The current trend is the emergence of the front-end equipment (mobile phones, tablets, desktop computers, other special equipment ...). )。Therefore, there must be a unified mechanism to facilitate the communication of different front-end devices to the backend. This led to the popularity of
The Web application is divided into two parts, front end and back end. The current development trend is the front-end equipment (mobile phones, tablets, desktop computers, other special equipment ...).Therefore, there must be a unified mechanism to facilitate the communication of different front-end devices to the backend. This led to the popularity of API architecture, and even the "API first"
difference and other architectural style
For the resource-oriented architectural style of rest, a new architectural concept is proposed, namely: resource-oriented architecture (Roa:resource oriented Architecture)
Second, RESTful API design
1. Agreement
The API communicates
Meaning:
http Methods: Also known as HTTP Verbs,http Methods can be translated into the HTTP method . They are part of the HTTP protocol, which mainly specifies how HTTP requests and operates resources on the server, often get,post, and so on.
API:application Programming Interface application interface, RESTful API, such API is via HTTP protocol URL
Not long ago to do a project, is to use the YII2 framework to write a restful style of API, went to the next "YII 2.0 authoritative Guide", found that the above is written relatively brief. So just write a tutorial post here to help you get started quickly with a small partner who has just come into contact with YII2 framework restful.I. Directory structureThe im
Recently, it has been hard to find out whether to create restful APIs or those previously called functions. If you create a restful API, there are many design issues to be clarified. This is not a matter of time. When you use a web API to create a
Restful api security design guide
The full name of REST is REpresentational State Transfer, which indicates stateless transmission without session. Therefore, each request must carry authentication information. Rest is based on http and stateless. It is only an architectural method, so its security features must be implemented by ourselves and there is no ready-m
Web APIs have become more and more popular in recent years, and the simplicity of API design has become particularly important in multi-backend system interaction applications. In general, RESTful APIs are used as our Web API. This article describes some of the best practices for designing simple
RESTFul API design guide and instructions for useRESTFul API design guide and instructions for use
I. AgreementThe communication protocol between APIs and users. HTTP is used.
2. Domain NameTry to deploy the API under a dedicated
is 2 hours, that is, 7,200 seconds)Error code, such as error codes, the JSON packet example is as follows (the example is AppID invalid error):{"Errcode": 40013, "errmsg": "Invalid AppID"}Reference article:https://www.zhihu.com/question/20863625http://blog.csdn.net/gebitan505/article/details/39178035Http://www.tuicool.com/articles/jQJV3ihttp://www.oschina.net/question/1433358_233412Http://www.lai18.com/content/944366.htmlhttp://blog.csdn.net/gebitan505/article/details/39178917http://blog.csdn.n
The concept of Restful API here does not bother, Bo friends online search ha definition articles a lot, straight into the point:First, throw a question:Judging by the ID of the user, the name is the product of Call of Duty (COD14) exists (say I still like to play like the World War II mission call this amount, off-topic ...)? If this problem occurs in an MVC project, I think we will generally
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.