aimeos / aimeos-typo3

TYPO3 e-commerce extension for ultra fast online shops, scalable marketplaces, complex B2B applications and #gigacommerce
https://aimeos.org/TYPO3
GNU General Public License v3.0
274 stars 738 forks source link

Json api alwas returns "use options method..." error #174

Closed Blechlawine closed 3 years ago

Blechlawine commented 3 years ago

It doesn't seem to care about any parameters. I tried nested parameters and not nested, both produce the same response. I used the options method to retrieve the urls for the resources and now I am trying to get the catalog resource. If you need any more information, i'll happily provide it. Thanks in advance for helping.

aimeos commented 3 years ago

Did you read https://aimeos.org/docs/latest/frontend/jsonapi/ regarding nested parameters?

Blechlawine commented 3 years ago

Did you read https://aimeos.org/docs/latest/frontend/jsonapi/ regarding nested parameters?

Yes, I did read that and I also tried nested parameters exactly like "ai[resource]=catalog", which my url in the options response said. And that didn't work.

aimeos commented 3 years ago

Please post your used URLs

Blechlawine commented 3 years ago

my url is: "/api?ai[resource]=catalog&ai[action]=options&ai[controller]=Jsonapi", but url encoded.

aimeos commented 3 years ago

What's the response of the OPTIONS request sent to /api?

Blechlawine commented 3 years ago

What's the response of the OPTIONS request sent to /api?

exactly that url

aimeos commented 3 years ago

And what's exactly the response of GET /api?ai[resource]=catalog&ai[action]=options&ai[controller]=Jsonapi

Blechlawine commented 3 years ago

{ "errors": { "title": "Use OPTIONS method for the resource list", "detail": "This is the Aimeos JSON REST API\n\nUse the HTTP OPTIONS method to retrieve a list available resources from /api?ai%5Baction%5D=options&ai%5Bcontroller%5D=Jsonapi\nDocumentation about he Aimeos JSON REST API is available at https://aimeos.org/docs/Developers/Client/JSONAPI" } }

Blechlawine commented 3 years ago

Ok, so i started with a new installation of typo3, and without changing anything or adding any pages, installed aimeos. Now it works. I still dont know why, but it seems my previous installation of typ3 or aimeos was somehow scuffed.