Questions tagged [postman]

Postman is a client for sending and emulating requests over HTTP. It is most commonly used with API requests. Use for questions about the tool itself. Use with any relevant API tags if you are having issues with a specific use.

Started out as a simple testing tool, Postman is now an elegant, flexible tool used to build connected software via APIs - quickly, easily, and accurately. It is used by nearly five million developers and more than 100,000 companies worldwide.

Postman enables you to:

  • Create Collections of requests
  • Organize your work within different Workspaces
  • Split-stack development with Mock Servers
  • Use Tests & Scripts to add dynamic parameters
  • Automate tests with Collection Runner
  • Test performance & behavior with Monitors
  • Document & Publish Collections for collaboration
12313 questions
33
votes
5 answers

Django Rest Framework Postman Token Authentication

I am using Django Rest Framework Token authentication and if i do curl http://localhost:8000/api/v1/users/?format=json -H 'Authorization: Token 0a813fdcd3f8846d6fa376f2592bbc678b0b8e85' everything works fine. But when i try to achieve that with…
psychok7
  • 5,373
  • 9
  • 63
  • 101
32
votes
11 answers

How to get to request parameters in Postman?

I'm writing tests for Postman which in general works pretty easily. However, I now want to access some of the data of the request, a query parameter to be exact. You can access the request URL through the "request.url" object which returns a String.…
Deddiekoel
  • 1,939
  • 3
  • 17
  • 25
32
votes
4 answers

Creating html doc from postman collection

I've developed a pretty extense API, and I have it on Postman, which works pretty nice. Now I have to generate an html doc to keep it versioned inside /docs along with my sources. Is there a tool or a way to achieve this? I really don't want to…
danielrvt
  • 10,177
  • 20
  • 80
  • 121
31
votes
6 answers

Is there any way to upload files via postman into a GraphQL API?

Currently I'm using Altair to upload files (in my case it's just for images) to my GraphQL API. However, all my other routes are stored in postman and it'd be nice if I could use just one application - Postman - for everything. In Altair I can…
meteoray
  • 335
  • 1
  • 3
  • 8
31
votes
8 answers

Getting access tokens from Postman: Tokens issued for the 'Single-Page Application' client-type may only be redeemed via cross-origin requests

We recently made a switch from Implicit Grant Flow to Authorization Code Flow with PKCE for our application, and now we're having some trouble getting access tokens from Azure AD from Postman. The app is registered in Azure AD and we're basically…
31
votes
8 answers

Add header to every request in Postman in pre-request script

I want to automatically add a header to every request in my whole collection using this pre-request script: pm.request.headers.add({ 'key': "myvar", 'value': pm.environment.get("myvar") }); myvar is an environment…
31
votes
1 answer

Get and store the value of a cookie using Postman

I need to get the value of a cookie, that is only created when I send a request in postman. I have tried everything but I don't know how to achieve this. I also need to store that value to use in further requests for my project. cookie name:…
Azzok
  • 423
  • 1
  • 4
  • 12
31
votes
5 answers

Postman scripts : "pm is not defined"

I try to write a Pre-request script in Postman. I want to to make a request so I try to use pm.sendRequest. For example : pm.sendRequest('http://example.com', function (err, res) { //... }); But I get this error : There was an error in…
electrotype
  • 8,342
  • 11
  • 59
  • 96
30
votes
3 answers

How to test if something is greater than certain number with POSTMAN

I'm trying to make a test in POSTMAN where the size has to be greater than 0 but I haven't been able to make the test correctly. What I did was to make it fail when the size is smaller than 0. Is there a function in postman to check if the size is…
mavi
  • 1,074
  • 2
  • 15
  • 29
30
votes
4 answers

POSTMAN for Multipart/form-data

How to use POSTMAN for Multipart/form-data which has customize header for testing my controller which takes 2 files as parameter (public ... controller( MultipartFile[] files))? POST ....…
phalco
  • 357
  • 2
  • 5
  • 12
30
votes
1 answer

Add csv file to HTTP POST

I want to send a postman HTTP POST. In this request, for key 'fisier', I like to attach a csv file. How this can be done? https://i.stack.imgur.com/Pnkii.png
Andrei
  • 329
  • 1
  • 3
  • 8
29
votes
1 answer

Can I use postman for onCall methods made as functions in firebase?

So I've made this very simple method, where I want to sign in with to firebase using a custom token. As of right now it's simply export const createCustomToken = functions.region('europe-west1').https.onCall(async (data, context) => { try { …
Mikkel Larsen
  • 876
  • 2
  • 14
  • 26
29
votes
11 answers

Laravel X-CSRF-Token mismatch with POSTMAN

I try to talk to my REST API built with Laravel. But the call with POSTMAN is rejected due to a token mismatch. I guess I need to include the CSRF token in the header. But do I need the encrypted one? When I insert this token I still get the error…
sesc360
  • 3,155
  • 10
  • 44
  • 86
29
votes
6 answers

Make dynamic name text field in Postman

I'm using Postman to make REST API calls to a server. I want to make the name field dynamic so I can run the request with a unique name every time. { "location": { "name": "Testuser2", // this should be unique, eg. Testuser3, Testuser4, etc …
manoj
  • 291
  • 1
  • 3
  • 6
29
votes
8 answers

JENKINS Authentication Fails

I am getting the following error while trying to trigger Jenkins job from any REST Client Authentication required