response method

Future<Response> response()

Implementation

Future<Response> response() async {
  switch (request.method) {
    case 'GET':
      await get();
      break;
    case 'POST':
      await post();
      break;
    case 'PUT':
      await put();
      break;
    case 'DELETE':
      await delete();
      break;
    case 'PATCH':
      await patch();
      break;
    default:
      Future(() => error(500, message: 'server error'));
      break;
  }
  return message;
}