Mailgun - 无效的资源类型:数组on put方法

I am working with mailgun php sdk. But I am getting error (Invalid resource type: array) when I try to update a user from mailing list. My Code is bellow.

$client = new \Http\Adapter\Guzzle6\Client();
$mgClient = new \Mailgun\Mailgun('YOUR_API_KEY', $client);
$listAddress = 'LIST@YOUR_DOMAIN_NAME';
$memberAddress = 'bob@example.com';

# Issue the call to the client.
$result = $mgClient->put("lists/$listAddress/members/$memberAddress", array(
    'subscribed' => 'no',
    'name'       => 'Foo Bar'
));

First, make sure you are using the last version of php-http/guzzle6-adapter, then try the following:

$client = \Http\Adapter\Guzzle6\Client::createWithConfig([
            'headers' => [
                'Content-Type' => 'application/x-www-form-urlencoded'
            ]
        ]);
$mgClient = new \Mailgun\Mailgun('YOUR_API_KEY', $client);

$listAddress = 'LIST@YOUR_DOMAIN_NAME';
$memberAddress = 'bob@example.com';

# Issue the call to the client.
$result = $mgClient->put("lists/$listAddress/members/$memberAddress", http_build_query([
    'subscribed' => 'no',
    'name'       => 'Foo Bar'
]));