Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #17845
| Newsgroups | comp.lang.javascript |
|---|---|
| Date | 2012-12-27 04:45 -0800 |
| Message-ID | <8e690182-3d15-4c62-be52-bdbd0109c975@googlegroups.com> (permalink) |
| Subject | ajax cross domain request by POST method with content type application/json skipping preflight OPTIONS request |
| From | dmitry.steblyuk@axibase.com |
I there a way to do this? The problem is server doesn't respond header Access-Control-Allow-Headers: content-type But i need to specify content-type: application/json As a consequence, when browser send preflight options request, i have message error in console like this Request header field Content-Type is not allowed by Access-Control-Allow-Headers When i use Postman(chrome extension) and send the same post request to the same server, then all fine: in network tab i don't see preflight options request, but only one post request with status OK. I copied my javascript code, which send this request, into the console in open Postman page. I invoke it and then all fine too. Why in Postman page preflight request is omitted? How they to this? Thanks a lot for any advance! Dmitry
Back to comp.lang.javascript | Previous | Next — Next in thread | Find similar | Unroll thread
ajax cross domain request by POST method with content type application/json skipping preflight OPTIONS request dmitry.steblyuk@axibase.com - 2012-12-27 04:45 -0800 Re: ajax cross domain request by POST method with content type application/json skipping preflight OPTIONS request Danny <dann90038@gmail.com> - 2012-12-27 12:03 -0800
csiph-web