title: HTTP/1.1 405 Method Not Allowed
body: <p>When making the GET method Service call using Postman, I get a successful response, but when doing the same call from Angular, I get the 405 error.</p>
  
  <pre><code>var token = "sdfasdfasdfasdfaerqwelruaoeuapiou"
  this.contentHeader = new Headers({"Content-Type":"application/json","Authorization":"Bearer"+token});
  
    this.http = http;
    this.url=IES.serviceUrl+'page/'+this.pageName;
    this.http.get(this.url,{ headers: this.contentHeader }).map(res =&gt; res.json())
    .subscribe(data =&gt; {
      this.pageData = data;
      this.pageControls = this.pageData.controls;
    } , error =&gt; {
          console.log('failed');
    });
  </code></pre>
  
  <p>This code sends the required "Authorization" header when run in IE browser, but fails to send the headers in FF/chrome</p>
  
  <p>The fiddler capture for FF/Chrome Browser is:</p>
  
  <pre><code>Request-Headers
  ...................
  OPTIONS localurl HTTP/1.1
  Host: localhost:21326
  Connection: keep-alive
  Access-Control-Request-Method: GET
  Origin: http://localhost:8100
  User-Agent: Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Mobile Safari/537.36
  Access-Control-Request-Headers: authorization, content-type
  Accept: */*
  Referer: http://localhost:8100/
  Accept-Encoding: gzip, deflate, sdch, br
  Accept-Language: en-US,en;q=0.8
  
  
  response(during angular call)
  ............
  HTTP/1.1 405 Method Not Allowed
  Cache-Control: no-cache
  Pragma: no-cache
  Allow: GET
  Content-Type: application/json; charset=utf-8
  Expires: -1
  Server: Microsoft-IIS/8.0
  X-AspNet-Version: 4.0.30319
  X-SourceFiles: =?UTF-8?B?RDpc2FyZA==?=
  X-Powered-By: ASP.NET
  Access-Control-Allow-Origin: *
  Access-Control-Allow-Methods: GET,PUT,POST,DELETE,OPTIONS
  Date: Thu, 23 Feb 2017 04:12:19 GMT
  Content-Length: 76
  
  {"Message":"The requested resource does not support http method 'OPTIONS'."}
  </code></pre>
  
  <p>The same for Rest Client in firefox or from IE Browser  is similar to</p>
  
  <pre><code>Request
  .....................
  
  GET localurl HTTP/1.1
  Host: localhost:21326
  User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0
  Accept: */*
  Accept-Language: null
  Accept-Encoding: gzip, deflate
  Content-Type: application/json
  Authorization: Bearer 9myBifb-HJG9tVpyopK495BA....String Truncated
  Connection: keep-alive
  
  
  Response
  ......................
  HTTP/1.1 200 OK
  Cache-Control: no-cache
  Pragma: no-cache
  Content-Type: application/json; charset=utf-8
  Expires: -1
  Server: Microsoft-IIS/8.0
  X-AspNet-Version: 4.0.30319
  X-SourceFiles: =?UTF-8?B?RDpc2FyZA==?=
  X-Powered-By: ASP.NET
  Access-Control-Allow-Origin: *
  Access-Control-Allow-Methods: GET,PUT,POST,DELETE,OPTIONS
  Date: Thu, 23 Feb 2017 04:14:09 GMT
  Content-Length: 221
  
  {"PageId":1,"PageName":"dashboard","controls":["barchart","pieChart","scatterChart"],"lists":{},"actions":{}}
  </code></pre>
  
  <p>Notice the Authorization Header in this </p>