Jump to content

Prestashop API Webservice and Ionic 3


OcB974

Recommended Posts

Hello,

I'm developing a mobile application under the ionic 3 framework. I'm currently trying to get product images from the Prestashop API Webservice (PS1.6.1.18). I can get a response, but the response get Error, but status 200.

5b5858b59248c_errorhttpresponse.png.826dab915726a0bd59bb978c7cd452c7.png

How i can get a good anwser from the API ?

 

I also try to create a post request (by sending the full contents of the xml) for the creation of a client account from the ionic application, on prestashop the client account is create, but the response of the query returns me a error, with a status 201.
No real documentation is available to understand requests by HTTP, it drives me crazy!

if someone know how work with http request with ionic, I'll take it.

 

Thanks in advance

 

Link to comment
Share on other sites

I found the solution. I need to specified in my request give me a responseType: 'text' because prestashop webservice response is XML ( for POST too ). I don't tried if GET request work with "output_format=JSON". 

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