/** * 生成完整 URL 地址 * * @param string $relative * @return string */ public static function makeUrl($relative) { if (Application::getConfig('security.enforce_https')) { $prefix = 'https://'; } else { $prefix = 'http://'; } return $prefix . Application::getConfig('canonical') . $relative; }
/** * POST * * @param $url * @return Request */ public static function post($url) { return self::authenticate(Request::post(Application::getConfig('background.url') . $url)); }