mirror of
https://github.com/guzzle/guzzle.git
synced 2025-02-24 18:13:00 +01:00
Fixing issue with setting options on head requests. Closes #352
This commit is contained in:
parent
04d554f6d4
commit
cae4acd96f
@ -244,7 +244,7 @@ class Client extends AbstractHasDispatcher implements ClientInterface
|
||||
|
||||
public function head($uri = null, $headers = null, array $options = array())
|
||||
{
|
||||
return $this->createRequest('HEAD', $uri, $headers, $options);
|
||||
return $this->createRequest('HEAD', $uri, $headers, null, $options);
|
||||
}
|
||||
|
||||
public function delete($uri = null, $headers = null, $body = null, array $options = array())
|
||||
|
@ -574,4 +574,11 @@ class ClientTest extends \Guzzle\Tests\GuzzleTestCase
|
||||
$client->setDefaultOption('allow_redirects', false);
|
||||
$this->assertFalse($client->getDefaultOption('allow_redirects'));
|
||||
}
|
||||
|
||||
public function testHeadCanUseOptions()
|
||||
{
|
||||
$client = new Client();
|
||||
$head = $client->head('http://www.foo.com', array(), array('query' => array('foo' => 'bar')));
|
||||
$this->assertEquals('bar', $head->getQuery()->get('foo'));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user