Skip to content

Commit

Permalink
Making the response object accept array or string for body
Browse files Browse the repository at this point in the history
  • Loading branch information
JustSteveKing committed May 2, 2023
1 parent 15a87af commit 886e50b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/DataObjects/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ final class Response implements TreblleObject
* @param int|null $code The HTTP Status Code.
* @param int|null $size The Response size in bytes.
* @param float|null $load_time The load time of the Response in microseconds.
* @param array<int|string,mixed> $body The complete JSON respinse returned by the server.
* @param string|array<int|string,mixed> $body The complete JSON respinse returned by the server.
*/
public function __construct(
public readonly array $headers,
public readonly null|int $code,
public readonly null|int $size,
public readonly null|float $load_time,
public readonly array $body,
public readonly string|array $body,
) {
}

Expand Down

0 comments on commit 886e50b

Please sign in to comment.