PHP Class 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.
Inheritance: extends ScriptFUSION\Porter\Connector\CachingConnector
Afficher le fichier Open project: ScriptFUSION/Porter Class Usage Examples

Méthodes publiques

Méthode Description
__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.

Private Methods

Méthode Description
getOrCreateUrlBuilder ( )

Method Details

__construct() public méthode

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

fetchFreshData() public méthode

public fetchFreshData ( string $source, EncapsulatedOptions $options = null ) : string
$source string Source.
$options ScriptFUSION\Porter\Options\EncapsulatedOptions Optional. Options.
Résultat string Response.

getBaseUrl() public méthode

public getBaseUrl ( ) : string
Résultat string

getTries() public méthode

Gets the maximum number of fetch attempts
public getTries ( ) : integer
Résultat integer

setBaseUrl() public méthode

public setBaseUrl ( $baseUrl )
$baseUrl

setTries() public méthode

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