title: How to subscribe the API fetched data in Shopware 6?
body: <p>I am a beginner to Shopware. I need to fetch data from an external API and display it in Shopware storefront. So far I have created a REST API inside the folder <code>Core/Api/</code> where I have written all the <code>http-client</code> codes to fetch data.</p>
  <p>My route is something like this:</p>
  <pre><code>@Route(&quot;/api/v{version}/_action/rest-api-handling/test&quot;, name=&quot;api.custom.rest_api_handling.test&quot;, methods={&quot;GET&quot;})
  </code></pre>
  <p>From the documentation <code>https://docs.shopware.com/en/shopware-platform-dev-en/how-to/register-subscriber</code> , I need to create a subscriber to dislay data.</p>
  <pre><code>class FooterSubscriber implements EventSubscriberInterface
  {
      public static function getSubscribedEvents(): array
      {
          return [
              StorefrontRenderEvent::class =&gt; 'onFooterPageLoaded'
          ];
      }
  
      public function onFooterPageLoaded(StorefrontRenderEvent $event): array
      {
          return [
              &quot;array&quot;
          ];
      }
  }
  </code></pre>
  <p>But I am not sure how can I call my <code>Route</code>.</p>
  <p>Can anybody please help me.</p>
  <p>Thank You.</p>