Skip to content

Commit e923244

Browse files
committed
Remove connect $method argument
1 parent 385374f commit e923244

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Symfony/Component/HttpClient/EventSourceHttpClient.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ public function __construct(HttpClientInterface $client = null, float $reconnect
3737
$this->reconnectionTime = $reconnectionTime;
3838
}
3939

40-
public function connect($method, string $url, array $options = []): ResponseInterface
40+
public function connect(string $url, array $options = []): ResponseInterface
4141
{
42-
return $this->request($method, $url, self::mergeDefaultOptions($options, [
42+
return $this->request('GET', $url, self::mergeDefaultOptions($options, [
4343
'buffer' => false,
4444
'headers' => [
4545
'Accept' => 'text/event-stream',

src/Symfony/Component/HttpClient/Tests/EventSourceHttpClientTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function testGetServerSentEvents()
7878
$httpClient->method('stream')->willReturn($responseStream);
7979

8080
$es = new EventSourceHttpClient($httpClient);
81-
$res = $es->connect('GET', 'http://localhost:8080/events');
81+
$res = $es->connect('http://localhost:8080/events');
8282

8383
$expected = [
8484
new FirstChunk(),

0 commit comments

Comments
 (0)