postman api测试_如何使用Postman轻松进行Web API的测试和播放

本文介绍了如何使用Postman这个强大的API测试工具进行API测试和学习。通过实例,逐步展示了如何创建和管理请求,理解授权,以及如何进行自动化测试。适合初学者和开发者了解和使用Postman进行API交互。
摘要由CSDN通过智能技术生成

postman api测试

In a world where static websites and apps increasingly depend on separately maintained APIs, it can be hard to figure out how they work by just playing around in the browser.

在当今静态网站和应用程序越来越依赖于单独维护的API的世界中,仅通过在浏览器中进行浏览就很难弄清它们的工作方式。

So how can we use Postman to both test our existing APIs and understand how they work?

那么,我们如何使用Postman来测试我们现有的API并了解它们如何工作?

什么是邮递员? (What is Postman?)

Postman is a tool teams can use to reliably test APIs using easy to use configurations. It comes stocked with features you would expect when dealing with APIs, including authentication, setting headers, customizing the payload, and a bunch more that help reduce the friction of using an API.

邮差是团队可以使用易于使用的配置可靠地测试API的工具。 它具有您在处理API时期望的功能,包括身份验证,设置标头,自定义有效负载,以及许多有助于减少使用API​​的麻烦的功能。

And it’s not just for testing. The beauty is that this can be used for many aspects of working with APIs for many different members of the team. Maybe a Project Manager wants to verify that things work or might find it easier to make a change straight with the API, or a QA Engineer needs to make sure everything still works, or a developer wants to actively make changes while working on the API itself.

而且不仅仅用于测试。 这样做的好处是,它可以用于团队中许多不同成员使用API​​的许多方面。 也许项目经理想要验证事情是否正常,或者可能会发现直接使用API​​进行更改更容易,或者质量检查工程师需要确保一切仍然可以正常工作,或者开发人员想要在对API本身进行工作的同时积极进行更改。

The best part about it – Postman provides collaboration features. The free tier includes exporting and importing collections of saved API requests as well as creating shared links. If you're part of a team, they have paid tiers that allow you to sync up your collections to make sure everyone has the most recent and up to date collection.

最好的部分– Postman提供协作功能。 免费套餐包括导出和导入已保存的API请求的集合以及创建共享链接。 如果您是团队的一员,他们会提供付费等级,使您可以同步收藏集,以确保每个人都拥有最新的收藏集。

我们要建立/学习什么? (What are we going to build / learn?)

We’re going to walk through two different example APIs to cover the concepts of Postman.

我们将通过两个不同的示例API来介绍Postman的概念。

First, we’ll walk through some simple HTTP requests with a public API for Pokémon.

首先,我们将通过Pokémon公共API来完成一些简单的HTTP请求。

We’ll then use the Yoda Translator API for one part to demonstrate how to make specific HTTP requests.

然后,我们将使用Yoda Translator API的一部分来演示如何发出特定的HTTP请求。

Once we understand how the basics work, we’ll use the Lord of the Rings API to learn how authentication works with APIs. For this, you’ll need to register for a free account for an API key.

一旦了解了基础知识的工作原理,我们将使用《指环王》 API来学习如何使用API​​进行身份验证。 为此,您需要注册一个免费的API密钥帐户。

第0部分:使用Postman进行设置 (Part 0: Getting set up with Postman)

Before we get started, you’ll need Postman in order to follow along with this walkthrough. The good news, is Postman is available for free on Mac, Windows, and Linux, so you should be able

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值