Angular 2 HTTP POST does an OPTIONS call

后端 未结 1 1296
误落风尘
误落风尘 2021-02-13 09:43

I\'m encountering a really strange problem with my Angular 2 application. I actually want to make a POST call containing a JSON to my Play Scala API, but it keeps want to try to

相关标签:
1条回答
  • 2021-02-13 10:25

    You are making a cross domain request.

    The request is to localhost:9000 and is made from localhost:9002.

    The browser creates a pre-flight request with the OPTIONS verb in order to know if he can continue and make the "real" request.

    Read more about CORS here.

    0 讨论(0)
提交回复
热议问题