1

I want to create a custom router in pwa.

I want to create blogs url. ( website.com/blogs )

so I can show all blogs list here.

Is anyone have an idea about this?

0

Refer : https://devdocs.magento.com/guides/v2.3/extension-dev-guide/webapi/custom-routes.html

<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_WebapiAsync:etc/webapi_async.xsd">
    <route url="V1/widgets" method="POST" alias="createWidget" />
    <route url="async/bulk/V1/widget" method="PUT" alias="asyncBulkUpdateWidgets"/>
    .........
</services>

This example redefines two routes:

All requests made on endpoint POST /createWidget will be forwarded to POST V1/widgets All requests made on endpoint PUT /asyncBulkUpdateWidgets will be forwarded to PUT async/bulk/V1/widget

Thanks!!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.