interface HttpClientInterface (View source)

Interface HttpClientInterface

A contract for HTTP clients that can perform GET requests to fetch data from the web.

Methods

string
get(string $url)

Perform an HTTP GET request to the specified URL and return the response body as a string.

Details

string get(string $url)

Perform an HTTP GET request to the specified URL and return the response body as a string.

Parameters

string $url

The URL to send the GET request to.

Return Value

string

The response body from the GET request.