PHP Interface Essence\Http\Client

Show file Open project: benjamminf/craft-embedded-assets Interface Usage Examples

Public Methods

Method Description
get ( string $url ) : string Retrieves contents from the given URL.
setUserAgent ( string $agent ) Sets the user agent for HTTP requests.

Method Details

get() public method

Retrieves contents from the given URL.
public get ( string $url ) : string
$url string The URL fo fetch contents from.
return string The contents.

setUserAgent() public method

Sets the user agent for HTTP requests.
public setUserAgent ( string $agent )
$agent string User agent.