def handle_post(core, request, params)
      payload = params['payload'] || request.body.read
      dispatch(core, request, *params['splat'], payload)
    rescue JSON::ParserError
      [400, 'Invalid JSON payload']
    end
def handle_post(core, request, params)
      payload = params['payload'] || request.body.read
      dispatch(core, request, *params['splat'], payload)
    rescue JSON::ParserError
      [400, 'Invalid JSON payload']
    end
Handles a POST request.

 @param core [Core] the bot to dispatch requests to
 @param request [Sinatra::Request] the request to handle
 @param params [Hash] the request parameters