Thenbsp\Wechat\Bridge\Http::request PHP Method

request() public static method

Create Client Factory
public static request ( $method, $uri )
    public static function request($method, $uri)
    {
        return new static($method, $uri);
    }

Usage Example

Beispiel #1
0
 /**
  * 发布菜单
  */
 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;
 }
All Usage Examples Of Thenbsp\Wechat\Bridge\Http::request