use body parser for api
use body parser only when necessary