我有一条具有注册功能的路线:
$app->post('/account/signup', function(\Slim\Http\Request $request, \Slim\Http\Response $response, $args) use($app) {
//new record to database
})->add(new Driver());
另外一个具有验证码生成
$app->post('/account/verification/byemail', function(\Slim\Http\Request $request, \Slim\Http\Response $response, $args) use($app) {
//Generate email verification code end send it
})->add(new Driver());
在要在'/ account / signup'中创建用户之后,我想调用'/ account / verification / byemail'并在其中传输一些数据('POST'方法,或通过HTTP_AUTHORIZATION标头)...
我尝试了$ app-> subRequest(),但没有成功=(