MakesHttpRequests
trait MakesHttpRequests (View source)
Properties
protected array | $defaultHeaders | Additional headers for the request. | |
protected array | $serverVariables | Additional server variables for the request. | |
protected bool | $followRedirects | Indicates whether redirects should be followed. |
Methods
$this | withHeaders(array $headers) Define additional headers to be sent with the request. | |
$this | withHeader(string $name, string $value) Add a header to be sent with the request. | |
$this | flushHeaders() Flush all the configured headers. | |
$this | withServerVariables(array $server) Define a set of server variables to be sent with the requests. | |
$this | withoutMiddleware(string|array $middleware = null) Disable middleware for the test. | |
handle($request, $next) No description |
Details
$this withHeaders(array $headers)
Define additional headers to be sent with the request.
$this withHeader(string $name, string $value)
Add a header to be sent with the request.
$this flushHeaders()
Flush all the configured headers.
$this withServerVariables(array $server)
Define a set of server variables to be sent with the requests.
$this withoutMiddleware(string|array $middleware = null)
Disable middleware for the test.
handle($request, $next)
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.7/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.html