magento / community-features

Magento Features Development is an Initiative to Allows Community Memebers Join to Development of Magento Features
46 stars 18 forks source link

Content Type x-www-form-urlencoded allowed for Api REST #92

Closed i4rebecamartinez closed 3 years ago

i4rebecamartinez commented 5 years ago

Summary

Content type x-www-form-urlencoded for API Rest calls are not allowed as Magento does not have any deserializer.

Proposed solution

Add new deserializer class for this type of request, and include new type in deserializers argument of Magento\Framework\Webapi\Rest\Request\DeserializerFactory.

Code content in https://github.com/magento/magento2/pull/18463

ihor-sviziev commented 4 years ago

Use case from https://github.com/magento/magento2/pull/18463#issuecomment-553445572

I have recently come across a need for this were we provided an API endpoint for a payment gateway to notify us of order statuses. Unfortunately I had no control of the headers they sent in their updates and the API would throw a 500 error when the header was application/x-www-form-urlencoded.

ihor-sviziev commented 4 years ago

I think this issue should be closed with resolution "won't fix". Described detailed in https://github.com/magento/magento2/pull/18463#issuecomment-638634757

@sdzhepa could you close this issue?

sivaschenko commented 3 years ago

Closed based on the discussion above