Ajax 跨域訪問post 請求,在服務器卻獲得的老是options請求html
由於此post請求的 content-type不是one of the 「application/x-www-form-urlencoded, multipart/form-data, or text/plain」, 因此Preflighted requests被髮起。node
「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/519c234863e9f8a542aa7ebdapp
http://www.cnblogs.com/virtual/p/3720750.htmldom
https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORSpost