title: GET request to remote server using Swagger
body: <p>I'm trying to use <code>Swagger</code> in my <strong>ASP.NET Core project</strong>. I have a <code>controller</code> with a method like this</p>
  
  <pre><code>[Produces("application/json")]
  [Route("api/MyMethod")]    
  public class ApiController : Controller
  {
      private HttpClient client = new HttpClient();
  
      /// &lt;summary&gt;
      /// Get api request
      /// &lt;/summary&gt;
      /// &lt;param name="query"&gt;&lt;/param&gt;
      [HttpGet]
      public void Get(string query)
      {
          var response = client.GetAsync(query).Result;
      }
  }
  </code></pre>
  
  <p>When I start the project, I can run my request, but it always uses 
  <strong>localhost</strong> as shown in figure:</p>
  
  <p><a href="https://i.stack.imgur.com/V70Hb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/V70Hb.png" alt="enter image description here"></a></p>
  
  <p>Can someone please explain how can I execute a request not to localhost? For example, like
  <a href="https://maps.googleapis.com/maps/api/place/textsearch/json?query=City" rel="nofollow noreferrer">https://maps.googleapis.com/maps/api/place/textsearch/json?query=City</a></p>