Jump to content

[SOLVED] How to send data from postman to module in Prestashop


Andrz2556

Recommended Posts

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 by Andrei H (see edit history)
  • Thanks 1
Link to comment
Share on other sites

  • Andrz2556 changed the title to [SOLVED] How to send data from postman to module in Prestashop

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...