PHP 클래스 GuzzleHttp\Client

상속: implements guzzlehttp\ClientInterface, use trait GuzzleHttp\Event\HasEmitterTrait
파일 보기 프로젝트 열기: nystudio107/instantanalytics 1 사용 예제들

공개 메소드들

메소드 설명
__call ( $method, $args )
__construct ( array $config = [] ) Clients accept an array of constructor parameters.
getConfig ( $option = null )
request ( $method, $uri = '', array $options = [] )
requestAsync ( $method, $uri = '', array $options = [] )
send ( Psr\Http\Message\RequestInterface $request, array $options = [] )
sendAsync ( Psr\Http\Message\RequestInterface $request, array $options = [] )

비공개 메소드들

메소드 설명
applyOptions ( Psr\Http\Message\RequestInterface $request, array &$options ) : Psr\Http\Message\RequestInterface Applies the array of request options to a request.
buildUri ( $uri, array $config )
configureDefaults ( array $config ) Configures the default options for a client.
invalidBody ( )
prepareDefaults ( array $options ) : array Merges default options into the array.
transfer ( Psr\Http\Message\RequestInterface $request, array $options ) : GuzzleHttp\Promise\PromiseInterface Transfers the given request and applies request options.

메소드 상세

__call() 공개 메소드

public __call ( $method, $args )

__construct() 공개 메소드

Here's an example of creating a client using a base_uri and an array of default request options to apply to each request: $client = new Client([ 'base_uri' => 'http://www.foo.com/1.0/', 'timeout' => 0, 'allow_redirects' => false, 'proxy' => '192.168.16.1:10' ]); Client configuration settings include the following options: - handler: (callable) Function that transfers HTTP requests over the wire. The function is called with a Psr7\Http\Message\RequestInterface and array of transfer options, and must return a GuzzleHttp\Promise\PromiseInterface that is fulfilled with a Psr7\Http\Message\ResponseInterface on success. "handler" is a constructor only option that cannot be overridden in per/request options. If no handler is provided, a default handler will be created that enables all of the request options below by attaching all of the default middleware to the handler. - base_uri: (string|UriInterface) Base URI of the client that is merged into relative URIs. Can be a string or instance of UriInterface. - **: any request option
또한 보기: GuzzleHttp\RequestOptions for a list of available request options.
public __construct ( array $config = [] )
$config array Client configuration settings.

getConfig() 공개 메소드

public getConfig ( $option = null )

request() 공개 메소드

public request ( $method, $uri = '', array $options = [] )
$options array

requestAsync() 공개 메소드

public requestAsync ( $method, $uri = '', array $options = [] )
$options array

send() 공개 메소드

public send ( Psr\Http\Message\RequestInterface $request, array $options = [] )
$request Psr\Http\Message\RequestInterface
$options array

sendAsync() 공개 메소드

public sendAsync ( Psr\Http\Message\RequestInterface $request, array $options = [] )
$request Psr\Http\Message\RequestInterface
$options array