flask - '400 Bad Request' when post JSON in PostMan but working fine using curl despite setting Content-Type -
i having issues using postman create same post request working using curl.
curl -i -h "content-type: application/json" -x post -d '{"daturl":"insert_base_64_here"}' http://localhost:5000/api
here settings postman , error get:
<!doctype html public "-//w3c//dtd html 3.2 final//en"> <title>400 bad request</title> <h1>bad request</h1> <p>failed decode json object: no json object decoded</p>
it being caused line in code, have set content-type application/json not sure causing it:
request.get_json(force = true)