Skip to content

Commit

Permalink
Remove mapWithKeys from Http Request and Response headers() methods (
Browse files Browse the repository at this point in the history
  • Loading branch information
cnanney authored and victorvilella committed Oct 12, 2021
1 parent e560d4a commit 6478049
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/Illuminate/Http/Client/Request.php
Expand Up @@ -120,9 +120,7 @@ public function header($key)
*/
public function headers()
{
return collect($this->request->getHeaders())->mapWithKeys(function ($values, $header) {
return [$header => $values];
})->all();
return $this->request->getHeaders();
}

/**
Expand Down
4 changes: 1 addition & 3 deletions src/Illuminate/Http/Client/Response.php
Expand Up @@ -107,9 +107,7 @@ public function header(string $header)
*/
public function headers()
{
return collect($this->response->getHeaders())->mapWithKeys(function ($v, $k) {
return [$k => $v];
})->all();
return $this->response->getHeaders();
}

/**
Expand Down

0 comments on commit 6478049

Please sign in to comment.