\ManiaControl\UtilsWebReader

Reader Utility Class for efficient Web Requests

Summary

Methods
Properties
Constants
getUrl()
loadUrl()
postUrl()
No public properties found
No constants found
newRequest()
performCallback()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

getUrl()

getUrl(string  $url, callable  $function = null) : \cURL\Response

Load a URL via GET

Parameters

string $url
callable $function

Returns

\cURL\Response

loadUrl()

loadUrl(  $url, callable  $function = null) 

Parameters

$url
callable $function

postUrl()

postUrl(string  $url, string  $content = null, callable  $function = null) : \cURL\Response

Load a URL via POST

Parameters

string $url
string $content
callable $function

Returns

\cURL\Response

newRequest()

newRequest(string  $url) : \cURL\Request

Create a new cURL Request for the given URL

Parameters

string $url

Returns

\cURL\Request

performCallback()

performCallback(\cURL\Response  $response, callable  $function) 

Perform the given callback function with the response

Parameters

\cURL\Response $response
callable $function