- class
HttpClient(httpclient\HttpClient) - source
httpclient/HttpClient.php
Description
Class HttpClient
->baseUrl:string->userAgent:string->referrer:string->followRedirects:bool->connectTimeout:string->readTimeout:string->proxyType:string- HTTP, SOCKS,->proxy:string->requestType:string- URLENCODE, MULTIPART, JSON, TEXT, XML, RAW->responseType:string- JSON, TEXT, XML, JSOUP->body:array|mixed->encoding:string->cookies:array->headers:array->bodyParser:null|callable->handlers:callable[]->_boundary:string->_threadPool:ThreadPool
->__construct()- HttpClient constructor.->setThreadPool()->get()->post()->put()->patch()->delete()->options()->head()->getAsync()->postAsync()->putAsync()->patchAsync()->deleteAsync()->optionsAsync()->headAsync()->sendAsync()->executeAsync()->send()->execute()->connect()->formatUrlencode()->formatMultipart()
__construct(string $baseUrl): voidHttpClient constructor.
setThreadPool([ php\lang\ThreadPool $pool): voidget(string $url, array $args): httpclient\HttpResponsepost(string $url, mixed $body): httpclient\HttpResponseput(string $url, mixed $body): httpclient\HttpResponsepatch(string $url, mixed $body): httpclient\HttpResponsedelete(string $url, array $args): httpclient\HttpResponseoptions(string $url, array $args): httpclient\HttpResponsehead(string $url, array $args): httpclient\HttpResponsegetAsync(string $url, array $args): php\concurrent\PromisepostAsync(string $url, mixed $body): php\concurrent\PromiseputAsync(string $url, mixed $body): php\concurrent\PromisepatchAsync(string $url, mixed $body): php\concurrent\PromisedeleteAsync(string $url, array $args): php\concurrent\PromiseoptionsAsync(string $url, array $args): php\concurrent\PromiseheadAsync(string $url, array $args): php\concurrent\PromisesendAsync(httpclient\HttpRequest $request, [ php\lang\ThreadPool $threadPool): php\concurrent\PromiseexecuteAsync(string $method, string $url, null $body): php\concurrent\Promisesend(httpclient\HttpRequest $request): httpclient\HttpResponseexecute(string $method, string $url, mixed $body): httpclient\HttpResponseconnect(httpclient\HttpRequest $request, mixed $fullUrl, php\net\URLConnection $connection, mixed $body): httpclient\HttpResponseformatUrlencode(array $data, string $prefix): stringformatMultipart(array $data, mixed $prefix): void