Post request does not have req.body

Hi, I added a url:
api.post('/access_token', function(req, res) {}

My curl post is:

curl -X POST \
-H "X-Parse-Application-Id: cn67FArPjbz46E6CprmZsbCXvo2PDRDgcneRoyp3" \
-H "Content-Type: application/json" \
-d '{"uid":2882341273,"channelName":"7d72365eb983485397e3e3f9d460bdda"}' \
http://localhost:1337/parse/access_token

However, the received post request does not have body when I tried to use req.body.
Is this because this sentence in ParseServer.js
api.use(express.json({ type: '*/*', limit: maxUploadSize })); ?
What does type: */* mean here?

Thanks

You should use bodyparser to access request body.

api.use(express.json())

Add this before your custom route.

Edit: seems like you added route under parse endpoint. Make sure api.use(express.json()) is before your route.

@uzaysan Thanks. My api.use(express.json()) came before the api.post('/access_token', function(req, res) {}. That is why.