Skip to content

Commit

Permalink
[8.x] Added reason phrase getter to Response class (laravel#39972)
Browse files Browse the repository at this point in the history
* Added reason phrase getter to Response class

* Update Response.php

Co-authored-by: Taylor Otwell <taylor@laravel.com>
  • Loading branch information
markvesterskov and taylorotwell authored Dec 10, 2021
1 parent d1ef8e5 commit ad0ebac
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Illuminate/Http/Client/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,16 @@ public function status()
return (int) $this->response->getStatusCode();
}

/**
* Get the reason phrase of the response.
*
* @return string
*/
public function reason()
{
return $this->response->getReasonPhrase();
}

/**
* Get the effective URI of the response.
*
Expand Down

0 comments on commit ad0ebac

Please sign in to comment.