Skip to content

Latest commit

 

History

History
268 lines (190 loc) · 4.96 KB

File metadata and controls

268 lines (190 loc) · 4.96 KB

HttpClient

  • class HttpClient (httpclient\HttpClient)
  • source httpclient/HttpClient.php

Description

Class HttpClient


Properties


Methods


Methods

__construct()

__construct(string $baseUrl): void

HttpClient constructor.


setThreadPool()

setThreadPool([ php\lang\ThreadPool $pool): void

get()

get(string $url, array $args): httpclient\HttpResponse

post()

post(string $url, mixed $body): httpclient\HttpResponse

put()

put(string $url, mixed $body): httpclient\HttpResponse

patch()

patch(string $url, mixed $body): httpclient\HttpResponse

delete()

delete(string $url, array $args): httpclient\HttpResponse

options()

options(string $url, array $args): httpclient\HttpResponse

head()

head(string $url, array $args): httpclient\HttpResponse

getAsync()

getAsync(string $url, array $args): php\concurrent\Promise

postAsync()

postAsync(string $url, mixed $body): php\concurrent\Promise

putAsync()

putAsync(string $url, mixed $body): php\concurrent\Promise

patchAsync()

patchAsync(string $url, mixed $body): php\concurrent\Promise

deleteAsync()

deleteAsync(string $url, array $args): php\concurrent\Promise

optionsAsync()

optionsAsync(string $url, array $args): php\concurrent\Promise

headAsync()

headAsync(string $url, array $args): php\concurrent\Promise

sendAsync()

sendAsync(httpclient\HttpRequest $request, [ php\lang\ThreadPool $threadPool): php\concurrent\Promise

executeAsync()

executeAsync(string $method, string $url, null $body): php\concurrent\Promise

send()

send(httpclient\HttpRequest $request): httpclient\HttpResponse

execute()

execute(string $method, string $url, mixed $body): httpclient\HttpResponse

connect()

connect(httpclient\HttpRequest $request, mixed $fullUrl, php\net\URLConnection $connection, mixed $body): httpclient\HttpResponse

formatUrlencode()

formatUrlencode(array $data, string $prefix): string

formatMultipart()

formatMultipart(array $data, mixed $prefix): void