PHP Класс ScriptFUSION\Porter\Net\Http\HttpConnector

Enhanced error reporting is achieved by ignoring HTTP error codes in the wrapper, instead throwing HttpServerException which includes the body of the response in the error message.
Наследование: extends ScriptFUSION\Porter\Connector\CachingConnector
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( HttpOptions $options = null )
fetchFreshData ( string $source, EncapsulatedOptions $options = null ) : string
getBaseUrl ( ) : string
getTries ( ) : integer Gets the maximum number of fetch attempts
setBaseUrl ( $baseUrl )
setTries ( integer $tries ) Sets the maximum number of fetch attempts.

Приватные методы

Метод Описание
getOrCreateUrlBuilder ( )

Описание методов

__construct() публичный Метод

public __construct ( HttpOptions $options = null )
$options HttpOptions

fetchFreshData() публичный Метод

public fetchFreshData ( string $source, EncapsulatedOptions $options = null ) : string
$source string Source.
$options ScriptFUSION\Porter\Options\EncapsulatedOptions Optional. Options.
Результат string Response.

getBaseUrl() публичный Метод

public getBaseUrl ( ) : string
Результат string

getTries() публичный Метод

Gets the maximum number of fetch attempts
public getTries ( ) : integer
Результат integer

setBaseUrl() публичный Метод

public setBaseUrl ( $baseUrl )
$baseUrl

setTries() публичный Метод

Sets the maximum number of fetch attempts.
public setTries ( integer $tries )
$tries integer Maximum fetch attempts.