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:

postman screenshot

<!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) 


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo