title: Angular HttpClient fails to proxy
body: <p>I have a spring boot back-end api and I am trying to call a service for uploading or getting images from angular project. I have a standard proxy.conf.json file:</p>
  
  <pre><code>{
     "/api": {
        "target": "localhost:8080",
        "secure": false,
        "logLevel": "debug"
     }
  }
  </code></pre>
  
  <p>if my angular service is using Http(HttpModule) everything is ok, but since its deprecated and i want to do it the new way i am trying with HttpClient(HttpClientModule) but in log i am getting :</p>
  
  <p><strong>[HPM] Error occurred while trying to proxy request /upload/ from localhost:4200 to localhost:8080 (ENOTFOUND) (<a href="https://nodejs.org/api/errors.html#errors_common_system_errors" rel="nofollow noreferrer">https://nodejs.org/api/errors.html#errors_common_system_errors</a>)</strong></p>
  
  <p>and it is not working. On one try on a linux machine i got the same mistake but with (EINVAL). Can someone  guide me what i am doing wrong ? Sorry if the question is stupid there are a few questions like this one but neither of their solutions does not seem to work in my case.</p>