title: XMLHttpRequest cannot load url. Method PUT is not allowed by Access-Control-Allow-Methods in preflight response
body: <p>I am using angularjs <code>$http</code> for ajax request. It is working fine with <code>get</code> and <code>post</code> but giving error in case of <code>put</code>.</p>
  
  <p><strong>Response Header :</strong></p>
  
  <pre><code>Access-Control-Allow-Headers:Origin, X-Requested-With, Content-Type, Accept, Accept-Encoding, Accept-Language, Host, Referer, User-Agent, X-API-KEY
  Access-Control-Allow-Methods:OPTIONS
  Access-Control-Allow-Origin:*
  Access-Control-Max-Age:1728000
  Content-Length:0
  Date:Mon, 25 Jan 2016 08:44:05 GMT
  Server:spray-can/1.3.2
  </code></pre>
  
  <p><strong>Request Header :</strong> </p>
  
  <pre><code>Accept:*/*
  Accept-Encoding:gzip, deflate, sdch
  Accept-Language:en-US,en;q=0.8,hi;q=0.6
  Access-Control-Request-Headers:accept, content-type, x-api-key
  Access-Control-Request-Method:PUT
  Connection:keep-alive
  Host:localhost:8080
  Origin:http://localhost:8000
  Referer:http://localhost:8000/
  User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36
  </code></pre>