PHP Class Clue\React\Buzz\Browser

Afficher le fichier Open project: clue/buzz-react Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( React\EventLoop\LoopInterface $loop, Sender $sender = null, MessageFactory $messageFactory = null )
delete ( $url, $headers = [], $content = '' )
get ( $url, $headers = [] )
head ( $url, $headers = [] )
patch ( $url, $headers = [], $content = '' )
post ( $url, $headers = [], $content = '' )
put ( $url, $headers = [], $content = '' )
send ( Psr\Http\Message\RequestInterface $request )
submit ( $url, array $fields, $headers = [], $method = 'POST' )
withBase ( string | Psr\Http\Message\UriInterface $baseUri ) : self Creates a new Browser instance with the given absolute base URI
withOptions ( array $options )
withSender ( Sender $sender )
withoutBase ( ) : self Creates a new Browser instance *without* a base URL

Method Details

__construct() public méthode

public __construct ( React\EventLoop\LoopInterface $loop, Sender $sender = null, MessageFactory $messageFactory = null )
$loop React\EventLoop\LoopInterface
$sender Clue\React\Buzz\Io\Sender
$messageFactory Clue\React\Buzz\Message\MessageFactory

delete() public méthode

public delete ( $url, $headers = [], $content = '' )

get() public méthode

public get ( $url, $headers = [] )

head() public méthode

public head ( $url, $headers = [] )

patch() public méthode

public patch ( $url, $headers = [], $content = '' )

post() public méthode

public post ( $url, $headers = [], $content = '' )

put() public méthode

public put ( $url, $headers = [], $content = '' )

send() public méthode

public send ( Psr\Http\Message\RequestInterface $request )
$request Psr\Http\Message\RequestInterface

submit() public méthode

public submit ( $url, array $fields, $headers = [], $method = 'POST' )
$fields array

withBase() public méthode

This is mostly useful for using (RESTful) HTTP APIs. Any relative URI passed to any of the request methods will simply be appended behind the given $baseUri. By definition of this library, a given base URI MUST always absolute and can not contain any placeholders.
See also: self::withoutBase()
public withBase ( string | Psr\Http\Message\UriInterface $baseUri ) : self
$baseUri string | Psr\Http\Message\UriInterface absolute base URI
Résultat self

withOptions() public méthode

public withOptions ( array $options )
$options array

withSender() public méthode

public withSender ( Sender $sender )
$sender Clue\React\Buzz\Io\Sender

withoutBase() public méthode

Creates a new Browser instance *without* a base URL
See also: self::withBase()
public withoutBase ( ) : self
Résultat self