Jump to content

Correct Parameters for web service get command


silversurfer5150

Recommended Posts

I have enabled web services and have been calling to them through the browser with url as below which works fine:

http://localhost/prestashop/api/products/1'>http://localhost/prestashop/api/products/1

Now I 'm trying to retrieve access the SOAP object through the API. The function is below but without the documentation it is just a guessing game. I'm getting bad http requests tho so I know I'm sending something.

public function fetch($key, $method, $url, $params, $inputXml = NULL)



I want to make a GET request and have been trying something like:

$wr = WebserviceRequest::getInstance(); // get instance 
$result = $wr->fetch("access_key", GET,"http://localhost/prestashop/api/products/1", NULL, NULL); 



Obviously the access key is the one from the back office, GET is the method, the url here I have tried entering the entire thing as you do with the browser and I have also tried http://localhost/prestashop/api/products/ as $url and /1 as $params. Actually you name it I've tried it, any ideas folks?

thanks

Silversurfer

Link to comment
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...