Questions tagged [postman-pre-request-script]

Use this tag for issues with pre-request scripts in postman, use the "postman" tag for general issues

Reference:

319 questions
0
votes
0 answers

Postman dont sent req.body if use from-data for input data

this code midleware this code where I input using the body/raw request it is successful but when I input data using from-data it always fails how to solve this problem iam Use From-data login fail,this code if iam use www-from login succes, this…
0
votes
1 answer

API-created vendor invoice in Sage Intacct shows 'Pending' state in API response but 'Submitted' in UI

I have created a vendor invoice in Sage Intacct using their API, but I'm experiencing a discrepancy between the state of the invoice in the API response and what is displayed in the Sage Intacct UI. In the API response, the invoice state is returned…
0
votes
1 answer

Remove auto backslashes from pre-request body

I want to make a pre-request for checking client's accounts for special systems. I set variables sourceSystem and targetSystem. Then Postman checks the similarity of systems'…
0
votes
1 answer

How to skip testcases in apidog? Is there any alternative of setNextRequest for apiddog like in postman

I want to skip nextrequest in apidog testcases. In postman we have postman.setNextRequest("request_name"); to skip the next request. Is there any alternative to skip the same in apiDog? I tried postman.setNextRequest("request_name") the same in…
0
votes
1 answer

Postman SAS token authorization failures

I'm having failures with the SAS token I'm generating to put an event on an Event Grid Topic via Postman. The error: "code": "Unauthorized", "message": "Invalid signature. The request authorization signature was not signed with any of the topic…
jamesd7198
  • 15
  • 1
  • 8
0
votes
0 answers

I want to parameterize API collection

I have 2 request API in postman now I want to do parameterization for them through CSV file, bit for first request I have 7 rows and for second request I have only 5 rows. And while running collection I have to pass same single CSV for both…
0
votes
0 answers

Uploading and altering a file in Postman

I am automating my API testing using Postman and Newman. I'd like to automate the process of uploading a file to my API, however before the file gets uploaded it needs to be altered. I can see how a file can be uploaded automatically, however I…
0
votes
0 answers

How to get a value stored in a request and can be read in the collection's pre-request script in Postman?

I am doing authentication for all the requests in the collection's pre-request script. The url for the authentication is dynamically created based on some criteria in the request but only in Postman. It doesn't get sent with the request. I can't set…
Tony_Henrich
  • 42,411
  • 75
  • 239
  • 374
0
votes
0 answers

Postman execute script before collection run

I'm a Java Developer and I'm starting to use Postman Runner and Newman. I have a test suite that need a token for the authorization header. This token is generated with a 3rd party service and I need to generate only one to run the entire test…
0
votes
0 answers

Postman: Get Prescript for Post: error parsing JSON with Content-Encoding: gzip

I Postman I am Preparing a POST Request. I need to pass an Entity ID, which I need to get from and Entity Name. Trying to use Pre-request Script for that. The Prescript fails, as body can't be parsed. I can see in the Console that the body is…
Dovile K.
  • 27
  • 5
0
votes
0 answers

why my date variable not change in global variable postman

i had set year,month,date,etc in global. it work when i created this. but when after 3 month. the variable is not change. I think it's because of Momentjs but when i try new Date() it same. not change anymore this my pre-script for set the global…
gepe
  • 71
  • 1
  • 5
0
votes
1 answer

Postman: How to open a browser window/redirect from a pre-request script?

I have a pre-request script in Postman that retrieves an internal identifier from an API based on a CLIENT_COMMON_NAME variable. To authenticate, I am using my browser cookies with Postman Interceptor and Interceptor Bridge. The pre-request script…
Theo
  • 2,262
  • 3
  • 23
  • 49
0
votes
1 answer

How to convert base64 code that is received back from a Postman get script to JPG

I have a get connection that with retrieve the photo of a student and it has the student id, though the image retrieved is on base64, can I export this automatically to jpg as part of my initial postman get script,so I request the photos and export…
0
votes
1 answer

How can I upload a file to s3 in postman using pre-signed url

I have a project that can upload files to AWS in a secure way. Postman was chose to test endpoints, but when I try to upload a file, is hard to mix the secure AWS s3 upload with the postman context. Considering there is an endpoint returning a…
0
votes
0 answers

Getting ReferenceError: KEYUTIL is not defined error when using Postman Runner, but the call works fine outside of Runner

I'm creating a JWT token for an API in Postman and when I did this process manually, it works without issue. However, when I take the call and put it into Postman Runner, I get an error stating 'ReferenceError: KEYUTIL is not defined'. I'm wondering…