title: Unable to call WebAPI controller from vue js
body: <p>I followed <a href="https://docs.microsoft.com/en-us/visualstudio/javascript/tutorial-asp-net-core-with-vue?view=vs-2022" rel="nofollow noreferrer">this tutorial</a> to create a single-page vuejs application with a WebAPI backend. I want to replace the default WeatherForecastController with one called SearchController. To start with, I created a functionally-identical controller along with a functionally-identical vuejs component. The API call is here:</p>
  <pre><code>methods: {
          fetchData(): void {
              this.post = null;
              this.loading = true;
  
              fetch('search')
                  .then(r =&gt; r.json())
                  .then(json =&gt; {
                      this.post = json as Forecasts;
                      this.loading = false;
                      return;
                  });
          }
      }
  </code></pre>
  <p>This is identical to the one provided by the template, except I've replaced the string 'weatherforecast' with search. I've also updated the vue.config.js file, replacing the weatherforecast proxy with one for search:</p>
  <pre><code>proxy: {
      '^/search': {
          target: 'https://localhost:5001/'
      }
  }
  </code></pre>
  <p>I've updated the main App.vue to import both components, but only the template WeatherForecast component is hitting its controller, even when I've replaced the proxy in the config. Is there something I'm missing?</p>