public static function request($method, $uri)
{
return new static($method, $uri);
}
/** * 发布菜单 */ public function doCreate() { $response = Http::request('POST', static::CREATE_URL)->withAccessToken($this->accessToken)->withBody($this->getRequestBody())->send(); if ($response['errcode'] != 0) { throw new \Exception($response['errmsg'], $response['errcode']); } return true; }