Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

75
Views
Postman create class

My goal is really simple. I would like to create a class named Helper to store all common data/methods for my collection.

This is how I planned to do : enter image description here

In the main pre-request Script this is the code :

var HELPER = pm.globals.get("HELPER");

console.log(HELPER.mandatory);
console.log(HELPER.checkIfEmpty());

I'm able to retrieve the mandatory variable but I cannot call checkIfEmpty

I get the following message: TypeError: HELPER.checkIfEmpty is not a function

As you can see, this method exist.

I checked this link but without success ...

Do you have any idea what I missed ??

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I found a way to manage what I expected :

enter image description here

and the main pre-request Script code :

console.log(helper.mandatorySubIssues());
console.log(helper.checkIfEmpty("Hello World"));
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!