protected function sendRequest(array $credentials): ResponseInterface
    {
        $options = [
            ('GET' === $this->requestMethod) ? 'query' : 'json' => $credentials,
        ];

        return $this->setHttpClient($this->app['http_client'])->request($this->getEndpoint(), $this->requestMethod, $options);
    }
protected function sendRequest(array $credentials): ResponseInterface
    {
        $options = [
            ('GET' === $this->requestMethod) ? 'query' : 'json' => $credentials,
        ];

        return $this->setHttpClient($this->app['http_client'])->request($this->getEndpoint(), $this->requestMethod, $options);
    }
protected function sendRequest ( array $ credentials ) : ResponseInterface { $ options = [ ( 'GET' === $ this -> requestMethod ) ? 'query' : 'json' => $ credentials , ] ; return $ this -> setHttpClient ( $ this -> app [ 'http_client' ] ) -> request ( $ this -> getEndpoint ( ) , $ this -> requestMethod , $ options ) ; }
Send http request.

@param array $credentials

@return ResponseInterface

@throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException
Send http request .