Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Pasang TamangRank #449 · 5.6K reputationPosted Mar 27, 2023, 3:19 AM EDT
Hi Tarun,
Postman works based on HTTP requests. Normal class does not have any routing so that it can be consume from Postman. What you can do is, write a function in normal class and call the function in controller action method.
Regards,
Pasang
Naimish MakwanaRank #324 · 7.7K reputationPosted Mar 27, 2023, 11:26 PM EDT
Hello Tarun,
No, you cannot hit a normal class directly using Postman as Postman is a tool used for testing APIs. In order to make requests using Postman, you need to have an API endpoint or a web service that can receive requests and send responses.
To call a method from a normal class using Postman, you need to expose the class functionality through an API endpoint or a web service. This can be achieved by creating a controller that calls the method in the normal class, and then making requests to the controller's API endpoints using Postman.
So, in short, you cannot directly call a normal class using Postman. You need to expose the class functionality through an API endpoint or a web service, and then call that endpoint using Postman.
Thanks
Naimish Makwana
TarunRank #6,374 · 268 reputationPosted Mar 28, 2023, 12:05 AM EDT
debugger; function CallPrint(strid) { var prtContent = document.getElementById(strid); var winprint = (window.open(",", 'left=0,top=0,width=1,hight=1,toolbar=0,scrollbar=0,starts=0')); winprint.document.write(prtContent.innerHTML); winprint.document.close(); winprint.focus(); winprint.print(); prtContent.innerHTML = stroldone; }