Http-Method changes from POST to OPTIONS when changing Content-Type

后端 未结 3 1370
-上瘾入骨i
-上瘾入骨i 2021-01-13 22:27

I am using closure library to do a simple POST. I think XhrIo should work because from my machine when I use any other rest client ,like Firefox browser app RESTClient or Ch

3条回答
  •  情深已故
    2021-01-13 22:44

    FWIW mine also failed to update the type when I specified...

    {'content-type':'application/json'}
    

    However, if I corrected the case to

    {'Content-Type':'application/json'}
    

    ... it worked.

    Go figure.

提交回复
热议问题