News:

AbanteCart v1.4.2 is released.

Main Menu

Do you like AbanteCart? Please rate AbanteCart or share your experience with other eCommerce entrepreneurs. Go to Softaculous rating page to add your rating or write a review

Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - onlyjunior

#1
Support / Re: rest api admin missing POST method
May 20, 2019, 07:29:43 PM
me again, after some tests and after debugging the code, I have found how does it work, I will try to explain here:

Scenario: Suppose we want to provide a route to create a product, so we need to implement a POST method.

In order to consume it, we have to make a
POST to url : localhost/index.php?s=admin&rt=a/myextension/product
and in the body pass the follwing form data:
api_key: YOUR_API_KEY
token: TOKEN_GOT_FROM_LOGIN

If you do a get, you can pass all the parameters as queryparameters as following:

localhost/index.php?s=admin&rt=a/myextension/product&api_key=YOU_API_KEY&token=YOUR_TOKEN

I am not sure if this info will be usefull for someone or it is just me the one who didn't get how it works  ;D

bye
#2
Support / rest api admin missing POST method
May 20, 2019, 03:18:43 PM
Hi,
I am working on an extension and I am trying to develop a rest api on the admin side. I was able to do a simple GET and I was able to consume it through POSTMAN, but now I want to do a POST. The problem is that looks like POST method is not allowed.

FYI, on the storefront side, I was able to add some rest api which handle GET, POST, PUT and DELETE (I had to do a simple crud). Is there some reason why it is not allowed by default on the admin side?
In case it is disabled, can someone please tell me (or guide me) on what I have to modify in order to allow it?

Forum Rules Code of conduct
AbanteCart.com 2010 -