title: how to pass url parameters in a http request in angular 4
body: <p>How to make get request by passing parameters? I tried this but getting 404 error</p>
  
  <pre><code>getOrderbyOrderNo() {
  
          this.orderno = this.cookie_service.get('key');
  
          let headers = new Headers();
          headers.append('Content-Type', 'application/json');
          headers.append('orderno', this.orderno );
          let params = new URLSearchParams();
          params.append("someParamKey", this.orderno )
  
          return this.http.get('http://localhost:8080/View/orders', { headers: headers, params: params })
  
  
      }
  </code></pre>
  
  <p>output</p>
  
  <pre><code>ERROR 
  Object { _body: "&lt;!DOCTYPE html&gt;\n&lt;html lang=\"en\"&gt;\n&lt;head&gt;\n&lt;meta charset=\"utf-8\"&gt;\n&lt;title&gt;Error&lt;/title&gt;\n&lt;/head&gt;\n&lt;body&gt;\n&lt;pre&gt;Cannot GET /View/orders&lt;/pre&gt;\n&lt;/body&gt;\n&lt;/html&gt;\n", status: 404, ok: false, statusText: "Not Found", headers: {…}, type: 2, url: "http://localhost:8080/View/orders" }
  </code></pre>