title: Get data from external API with a asp.net core API
body: <p>I'm learning to create APIs using ASP.NET core, in this I came up with a problem, I'm trying to execute a request for an external API using my API, but I do not know how to execute the request and return the JSON of the request, any help?</p>
  
  <p>The flow of the application looks something like this:</p>
  
  <p><strong>SPA -> AspNet Core WEB API -> External API</strong></p>
  
  <p>What I've done so far:</p>
  
  <pre><code>[Route("api/[Controller]")]
      public class RankingsController : Controller
      {
          private readonly IRankingRepository _rankingRepository;
  
          public RankingsController(IRankingRepository rankingRepo)
          {
              _rankingRepository = rankingRepo;
          }
  
          [HttpGet("{id}", Name = "GetRanking")]
          public IActionResult GetById(long id)
          //Here is where I want to make the requisition
          }
  
      }
  </code></pre>
  
  <p>I need to make the request for this API: </p>
  
  <p><a href="http://api.football-data.org/v1/competitions/" rel="noreferrer">http://api.football-data.org/v1/competitions/</a>{id}/leagueTable</p>
  
  <p><em>In the ID location, I need to pass a parameter that comes from the request made in my API;</em></p>
  
  <p>Any help for this problem?</p>
  
  <p>Sorry for not being such a complex question.</p>
  
  <p>Thanks!!</p>