storefront-nuxt3-magento2 integration
I have installed in my local machine
storefront-nuxt3-boilerplate
and then implement a custom magento integration following the docs instruction.
After yarn dev
I have this good feedback
So after I try to fetch some data, for example the categoryList.
So I put this code for the click of the button on BrowseProducts
of TopNavigationBar.
The problem is that with GET Request at the url
http://localhost:8181/magento/categoryList?body=[%7B%7D,null,null]
I get back 404, as you can see in the photo.
On the other hand, the same API Request with POST method, I get back exactly the data I need.
Could anyone explain this paradox and how I could solve it?11 Replies
Hi @kantro 👋 , can you show me your magento integration config on the middleware?
Hi @rohrig . Yes of course. I put the content of
middleware.config.js
below. (I have borrow some ideas from project nuxt3-magento-sdk-storefront )
Also I tried to change the useGETForQueries
to false
but the behavior was exactly the same.GitHub
GitHub - TidycodeIT/nuxt3-magento-sdk-storefront: A boilerplate sto...
A boilerplate storefront build with the Vue Storefront Magento 2 Integration and Storefront UI - GitHub - TidycodeIT/nuxt3-magento-sdk-storefront: A boilerplate storefront build with the Vue Storef...
Thanks. I'll see what I can find.
Please upgrade the
"@vue-storefront/magento-api": "^2.0.0",
to at least version 2.2.0
this is when the get functionality was introduced to the magento integration according to the changelog here: https://docs.vuestorefront.io/integrations/magento/reference/changelogs/vue-storefront-magento-apiin
package.json
file, I found my version is:
"@vue-storefront/magento-api": "^2.4.3",Should I downgrade? @rohrig hi, I have tried both version
"@vue-storefront/magento-api": "2.2.0"
and 2.3.0
but the Response is the same. Could you give me a link of this commits so I can see the code?what middleware version do you have?
@kantro ☝️
@rohrig
"@vue-storefront/middleware": "3.4.0",
I think that's the problem. you need at least 3.5 for get request, I think. let me confirm.
it looks very ok. Thank you