How to Send Requests from Scripts // Postman Pointers

preview_player
Показать описание
Welcome to Dev Odyssey Postman Pointers - Postman best practices that improve your workflow. In this video, we're covering how to send requests in scripts using the sendRequest function in your Pre-Request Script, or Tests sections of your Postman Request. Refer to the links below for the sendRequest example in the Dev Odyssey's Public Workspace:

00:00 Introduction
02:07 First Example sendRequest
02:32 Second example sendRequest
03:00 sendRequest Options
04:08 Third Example sendRequest
05:00 PostmanSDK classes sendRequest
05:37 sendRequest Options with Classes
09:20 Reviewing the Console
11:04 Outro

Postman Learning Center sendRequest

Postman SDK

The sendRequest function in Postman lets you send any http(s) request before your main Postman Request or after your Postman Request.

This function is most commonly useful for obtaining authentication tokens, such as OAuth Bearer Tokens, but has many other applications. Anytime you need to get or send data using http(s), the sendRequest function will be your best companion.

You can also codify your scripts using the Postman SDK, and in this video I go over how to do that with the sendRequest function. This is a better way to write code, because it's more legible, improves compiler performance, and explains the full set of options and features explicitly.

Learn more on how to use Postman from my other videos below.

Postman Pointers - How To Create a Dynamic Request Body in Postman

Watch - How to Upload, Download, and Preview Files (PDFs) with Postman

Watch - Learning GraphQL With Postman

Watch - How to Filter Data with Postman Visualizer

Watch - How to Visualize Data in Postman here!

Watch the first series, Introduction to Postman here!

Watch the second series, Advanced Postman here!

Download:

Questions about this episode or Postman? Ask in the comments!

Kahakai by Scandinavianz & Lahar
Creative Commons — Attribution 3.0 Unported — CC BY 3.0
Рекомендации по теме
Комментарии
Автор

How do you use pm.sendRequest? Do you simply use a url, do your throw in the options, or do some of you use the classes like I do? What's your favorite use case of pm.sendRequest?

DevOdyssey
Автор

Namaste Dev, This is dileep dilraj.Actually I want to scrap a website which asking login to scrap details but the problem is to request the website "we have to now what is in the form" here I cant see details I have to fill in the form and it showing in the form ids: (number), Could you please help me to solve this problem.

dileepdilraj