postman构建api_使用Postman更轻松地进行API构建和测试

postman构建api

Thanks to Jeff Smith for kindly helping to peer review this article.

感谢Jeff Smith的帮助,可以帮助您审阅本文。



Trending posts on SitePoint today:

今天在SitePoint上的热门帖子:

  • What is HTTP/2?

    什么是HTTP / 2?

  • Tame Unruly Style Sheets With These Three CSS Methodologies

    使用这三种CSS方法来驯服不规则的样式表

  • Your Regular WordPress Maintenance Checklist

    您的常规WordPress维护清单

  • Shared Server Hosting: the Pros and Cons

    共享服务器托管:优点和缺点

  • Why Every Website Needs HTTPS

    为什么每个网站都需要HTTPS



An API (application programming interface) is a medium of interaction between applications. APIs that use HTTP or HTTPS are called Web APIs.

API(应用程序编程接口)是应用程序之间交互的媒介。 使用HTTP或HTTPS的API称为Web API。

If you look around on the Internet, a large number of services use APIs. Anything with a social login uses an API; the mobile application of an ecommerce site uses an API; even the ads that you see on the Internet use APIs!

如果您在Internet上四处浏览,则大量服务会使用API​​。 任何具有社交登录名的东西都使用API​​; 电子商务网站的移动应用程序使用API​​; 甚至您在Internet上看到的广告都使用API​​!

By creating an API for your service, you enable third-party developers to create applications based on your service. For instance, the social newspaper Frrole uses the Twitter API to generate contextual insights by analyzing a large volume of tweets.

通过为您的服务创建API,您可以使第三方开发人员能够基于您的服务创建应用程序。 例如,社交报纸Frrole使用Twitter API通过分析大量推文来生成上下文见解。

Assuming you have assessed the pros and cons of creating an API, let’s talk briefly about the process of creating and testing APIs.

假设您已经评估了创建API的利弊 ,让我们简要地谈谈创建和测试API的过程。

创建API (Creating APIs)

Although there are many ways of creating an API, a Web API is created using the REST (Representational State Transfer) framework. The REST framework states a set of guidelines that one must follow while creating an API. With the large number of APIs being created daily, it serves as a standard for Web-based APIs.

虽然有创建API的方法很多,使用REST(表象泰特小号 贸易交接)框架创建一个Web API。 REST框架规定了一组创建API时必须遵循的准则。 每天都会创建大量的API,它成为基于Web的API的标准。

The four most common actions performed through APIs are view, create, edit and delete objects. The REST framework maps four HTTP verbs to these actions: GET, POST, PUT and DELETE. There are many verbs that have been added to this list like PURGE and PATCH, but in this article, we’ll talk about only the four basic ones. This article on

你可能感兴趣的:(python,java,linux,编程语言,大数据)