DEV Community

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

Collapse
boredomdenied profile image
boredomdenied • Edited

I'm getting this error:

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

update

has been resolved by adding force=True

body = request.get_json(force=True)
Collapse
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?