DEV Community

Discussion on: Flask Rest API -Part:1- Using MongoDB with Flask

boredomdenied profile image
boredomdenied • Edited

I'm getting this error:

TypeError: TopLevelDocumentMetaclass object argument after ** must be a mapping, not NoneType


has been resolved by adding force=True

body = request.get_json(force=True)
paurakhsharma profile image
Paurakh Sharma Humagain Author

Awesome 👍 Glad that you got it to work. I am not sure how you got this problem. Maybe something to do with your request body?