Closed lmartins closed 1 year ago
Please correct me if I'm wrong but looks like this is not being caused by the app-bridge-utils
after all, but rather standard behaviour for the Express server.
You need to add another middleware to the endpoints that need to take in body content via POST requests: https://stackoverflow.com/questions/9177049/express-js-req-body-undefined
Describe the bug
I'm building a Shopify app having started with the Shopify CLI. Included with that install comes a fetch wrapper utility from
@shopify/app-bridge-utils
that wraps nativefetch
API so that it includes authentication details with requests using the returning utility.I'm able to successfully use that for any GET request, but all POST/PUT requests are stripped from the request body.
Is this intended behavior? If so is there a different way to handle POST requests?
Packages and versions
List the relevant packages you’re using, and their versions. For example:
@shopify/app-bridge
@^3.1.0
@shopify/app-bridge-utils
@^3.1.0
@shopify/app-bridge-react
@3.1.0
@shopify/polaris
@9.11.0