Skip to content

Commit ca534cb

Browse files
committed
Update
1 parent 227185a commit ca534cb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Http/V2/Client.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ private function transformResponse(SwResponse $request): ResponseInterface
7777
return new Response(
7878
$request->streamId,
7979
$request->statusCode,
80-
$request->headers,
80+
$request->headers ?? [],
8181
$request->data
8282
);
8383
}

src/Http/V2/Response.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
class Response implements ResponseInterface
1717
{
18-
public function __construct(protected int $streamId, protected int $statusCode, protected ?array $headers, protected ?string $body)
18+
public function __construct(protected int $streamId, protected int $statusCode, protected array $headers, protected ?string $body)
1919
{
2020
}
2121

@@ -29,7 +29,7 @@ public function getStatusCode(): int
2929
return $this->statusCode;
3030
}
3131

32-
public function getHeaders(): ?array
32+
public function getHeaders(): array
3333
{
3434
return $this->headers;
3535
}

0 commit comments

Comments
 (0)