Normal Class In How to Hit through Postman in asp.net
Loading
Normal Class In How to Hit through Postman in asp.net
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
TarunPosted Mar 28, 2023, 4:05 AM
Naimish MakwanaPosted Mar 28, 2023, 3:26 AM
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
Pasang TamangPosted Mar 27, 2023, 7:19 AM
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