Angular JS POST request not sending JSON data

前端 未结 7 1701
忘掉有多难
忘掉有多难 2020-12-01 10:30

I am trying to send an object as JSON to my webservice in Flask that is expecting JSON in the request data.

I have tested the service manually by sending JSON data a

相关标签:
7条回答
  • 2020-12-01 11:03

    try to use absolute url. if it not works, check if service's response has headers:

    Access-Control-Allow-Origin and Access-Control-Allow-Headers

    for example:

    "Access-Control-Allow-Origin": "*"
    "Access-Control-Allow-Headers": "Origin, X-Requested-With, Content-Type, Accept"
    
    0 讨论(0)
提交回复
热议问题