CORS 中的POST and OPTIONS 请求
Ajax 跨域访问post 请求,在服务器却得到的总是options请求
因为此post请求的 content-type不是one of the “application/x-www-form-urlencoded, multipart/form-data, or text/plain”, 所以Preflighted requests被发起。
“preflighted” requests first send an HTTP OPTIONS request header to the resource on the other domain, in order to determine whether the actual request is safe to send. 然后得到服务器response许可之后。
参考文章:
http://cnodejs.org/topic/519c234863e9f8a542aa7ebd
http://www.cnblogs.com/virtual/p/3720750.html
https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS