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 APIs.A noun used instead of a verbUsing nouns to define int
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 API interface, otherwise it will lead to the disclosure of
NET + Offline Salon | Mobile app Mode innovation: give you a reason to do the app >>Good API design: In the self-description, at the same time to achieve abstract goals.Well-designed APIs allow developers to get started quickly, without the need to keep manuals and documentation often, or to visit the tech support community frequently.Smooth interfaceMethod chain: Smooth and easy to read, easier to understa
key to encrypt and decrypt the content of the communication.This trick should be able to let the hacker dumbfounded. But the premise is that the user name and password can not be disclosed.Finally, let's talk about the soap and rest application scenarios,In fact, the essence of SOA is a kind of network function call, if our needs can be abstracted into resources, we can use rest, and the more accurate the
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 design this:Ap
Rest is a software architecture style. The RESTful API is an HTTP protocol-based API and is a stateless transport. Its core is to understand all the APIs as a network resource. Encapsulates the state transitions (actions) of all clients and servers into the Method of HTTP requests.You can read http://mengkang.net/620.html for details.This article is mainly about
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 domain name (http://api.example.com)You can a
General IdeasThis involves two aspects of the problem:One is the interface access authentication problem, the main solution is who can use the interface (user login authentication, routing authentication)One is data transmission security, the main solution interface data is monitored (HTTPS secure transmission, sensitive content encryption, digital signature)User authentication: Token and sessionThe Open Interface API service is actually a form of sta
ioexception {File Source = new file ("in"); file destination = new file ("out "); input
The second common operation is to map data from one type to another. It means that the data types of input and output must be different, and there is a way to map the input data type to the output data type. The following example maps a string to a jsonobject and first defines the conversion method:
public interface Function
The rest is basically similar to the
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.