HttpClient class

package Default

 Methods

DELETE Communication

delete(string $url, \Kore\array<mixed> $params = array(), \Kore\array<mixed> $headers = array(), string|null $userpwd = null) : \Kore\HttpResponse
see \Kore\HttpResponse

Parameters

$url

string

request url

$params

\Kore\array<mixed>

request parameters

$headers

\Kore\array<mixed>

request headers

$userpwd

stringnull

user name and password

Exceptions

\Exception

Returns

\Kore\HttpResponse\Kore\HttpResponse

GET Communication

get(string $url, \Kore\array<mixed> $params = array(), \Kore\array<mixed> $headers = array(), string|null $userpwd = null) : \Kore\HttpResponse
see \Kore\HttpResponse

Parameters

$url

string

request url

$params

\Kore\array<mixed>

request parameters

$headers

\Kore\array<mixed>

request headers

$userpwd

stringnull

user name and password

Exceptions

\Exception

Returns

\Kore\HttpResponse\Kore\HttpResponse

PATCH Communication

patch(string $url, \Kore\array<mixed> $params = array(), \Kore\array<mixed> $headers = array(), string|null $userpwd = null) : \Kore\HttpResponse
see \Kore\HttpResponse

Parameters

$url

string

request url

$params

\Kore\array<mixed>

request parameters

$headers

\Kore\array<mixed>

request headers

$userpwd

stringnull

user name and password

Exceptions

\Exception

Returns

\Kore\HttpResponse\Kore\HttpResponse

POST Communication

post(string $url, \Kore\array<mixed> $params = array(), \Kore\array<mixed> $headers = array(), string|null $userpwd = null) : \Kore\HttpResponse
see \Kore\HttpResponse

Parameters

$url

string

request url

$params

\Kore\array<mixed>

request parameters

$headers

\Kore\array<mixed>

request headers

$userpwd

stringnull

user name and password

Exceptions

\Exception

Returns

\Kore\HttpResponse\Kore\HttpResponse

PUT Communication

put(string $url, \Kore\array<mixed> $params = array(), \Kore\array<mixed> $headers = array(), string|null $userpwd = null) : \Kore\HttpResponse
see \Kore\HttpResponse

Parameters

$url

string

request url

$params

\Kore\array<mixed>

request parameters

$headers

\Kore\array<mixed>

request headers

$userpwd

stringnull

user name and password

Exceptions

\Exception

Returns

\Kore\HttpResponse\Kore\HttpResponse

Set connect timeout

setConnectTimeout(integer $connectTimeout) : void

Parameters

$connectTimeout

integer

connect timeout

Set timeout

setTimeout(integer $timeout) : void

Parameters

$timeout

integer

timeout

 Properties