status = $response->getStatusCode(); $this->body = $response->getBody()->getContents(); $this->headers = $response->getHeaders(); if ($note) { $this->body = $note . "\n" . $this->body; } $body = Str::limit($this->body, 100); parent::__construct(__("Unexpected response (status=:status)\n:body", [ 'status' => $this->status, 'body' => $body, ]), 0); } public function getStatusCode(): int { return $this->status; } public function getHeaders(): array { return $this->headers; } }