Andrz2556 Posted April 18, 2024 Share Posted April 18, 2024 (edited) Hello, I did try such url Quote http://mysite/modules/newmodule/src/controllers/front/slides?type=product&active=null for postman request but only returning html page not json. Somebody used prestashop module in postman? Edited April 19, 2024 by Andrz2556 (see edit history) Link to comment Share on other sites More sharing options...
Andrei H Posted April 18, 2024 Share Posted April 18, 2024 (edited) Hello, It is definitely possible to make a request to a controller from Postman. In your case, the problem seems to be the fact that the URL is incorrect. In order to get the URL for the controller you can use the following method in your module's main class: $this->context->link->getModuleLink('<module_name>', 'controller_name'); This will generate a link with the following structure: '<base_url>/<lang>/module/<module_name>/<controller_name>' - the lang part might be optional in your case. Once you get the actual URL, you should be able to make requests to it from Postman. Edited April 18, 2024 by Andrei H (see edit history) 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now