class Illuminate / Http / Client / Request

Request

Implements

Uses

Properties

protected

$request Psr\...\RequestInterface

The underlying PSR request.

Default: null
protected

$data array

The decoded payload for the request.

Default: null

Methods

public

__construct ( $request ) : void

Create a new request instance.

Parameters

  • $request Psr\...\RequestInterface
public

method ( ) : string

Get the request method.

public

url ( ) : string

Get the URL of the request.

public

hasHeader ( $key , $value ) : bool

Determine if the request has a given header.

Parameters

  • $key string
  • $value mixed
public

hasHeaders ( $headers ) : bool

Determine if the request has the given headers.

Parameters

  • $headers array|string
public

Get the values for the header with the given name.

Parameters

  • $key string
public

headers ( ) : array

Get the request headers.

public

body ( ) : string

Get the body of the request.

public

hasFile ( $name , $value , $filename ) : bool

Determine if the request contains the given file.

Parameters

  • $name string
  • $value string|null
  • $filename string|null
public

data ( ) : array

Get the request's data (form parameters or JSON).

protected

parameters ( ) : array

Get the request's form parameters.

protected

json ( ) : array

Get the JSON decoded body of the request.

public

isForm ( ) : bool

Determine if the request is simple form data.

public

isJson ( ) : bool

Determine if the request is JSON.

public

isMultipart ( ) : bool

Determine if the request is multipart.

public

withData ( array $data ) : $this

Set the decoded data on the request.

Parameters

  • $data array
public

toPsrRequest ( ) : Psr\...\RequestInterface

Get the underlying PSR compliant request instance.

public

offsetExists ( $offset ) : bool

Determine if the given offset exists.

Parameters

  • $offset string
public

offsetGet ( $offset ) : mixed

Get the value for a given offset.

Parameters

  • $offset string
public

offsetSet ( $offset , $value ) : void

Set the value at the given offset.

Parameters

  • $offset string
  • $value mixed
public

offsetUnset ( $offset ) : void

Unset the value at the given offset.

Parameters

  • $offset string