Jump to content

Web service module return bad request

Recommended Posts


I try to devlop a very simple module to access my prestashop site in 1.6.

My code is like this :

  $webService = new PrestaShopWebservice('http://mysite/api/', 'XXXXXXXXXXXXXXXXXXXXXXXXXX', false); 
  $xml = $webService->get(array('resource' => 'product_option_values'));
  //$opt['resource']= 'product_option_values';
  //$xml = $webService->get($opt);
 catch (PrestaShopWebserviceException $ex) {
    // Shows a message related to the error
    echo 'Other error: <br />' . $ex->getMessage();

The module return bad request (err. 400)

The web service works with URL : http://mysite.com/api/product_option_values


What I am doing wrong ?

Thanks for helping me.




Share this post

Link to post
Share on other sites

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...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More