<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Samuel Peña</title>
    <description>The latest articles on DEV Community by Samuel Peña (@samuelpg30).</description>
    <link>https://dev.to/samuelpg30</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3565513%2Ffe1ba32e-9d5e-4cb8-9384-541432204b94.jpg</url>
      <title>DEV Community: Samuel Peña</title>
      <link>https://dev.to/samuelpg30</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/samuelpg30"/>
    <language>en</language>
    <item>
      <title>: Issues with APIs for soccer stats and CORS when using API</title>
      <dc:creator>Samuel Peña</dc:creator>
      <pubDate>Wed, 15 Oct 2025 00:49:59 +0000</pubDate>
      <link>https://dev.to/samuelpg30/-issues-with-apis-for-soccer-stats-and-cors-when-using-api-64d</link>
      <guid>https://dev.to/samuelpg30/-issues-with-apis-for-soccer-stats-and-cors-when-using-api-64d</guid>
      <description>&lt;p&gt;Hi everyone! I'm building a small application that fetches soccer data. I have two APIs:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;League standings&lt;/strong&gt; – this works perfectly on my &lt;strong&gt;local server&lt;/strong&gt; but fails when I try to fetch it from a remote environment. I don't understand why.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Player statistics&lt;/strong&gt; – this API gives me an &lt;strong&gt;error directly&lt;/strong&gt;, I can't even fetch the data.
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I created a &lt;strong&gt;PHP backend&lt;/strong&gt; to handle these requests, because I read that fetching the APIs directly from the frontend can cause browser permission issues (CORS). But I'm not sure if this is the correct approach.  &lt;/p&gt;

&lt;p&gt;My questions are:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Why does the standings API only work locally?
&lt;/li&gt;
&lt;li&gt;Why does the player stats API fail?
&lt;/li&gt;
&lt;li&gt;Is it correct to use a PHP backend to avoid CORS, or is there a better approach?
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Any guidance or tips would be greatly appreciated. Thank you!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>php</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
