$client = new Zend_Http_Client('https://api.example.com/'); $response = $client->request('GET'); echo $response->getBody(); // output the response body
$client = new Zend_Http_Client('https://api.example.com/'); $client->setParameterPost('name', 'John Doe'); $client->setParameterPost('email', 'johndoe@example.com'); $response = $client->request('POST'); echo $response->getBody(); // output the response bodyIn this example, we create a new instance of Zend_Http_Client with the URL of the API endpoint we want to call. We then set two parameters to be sent as part of the POST request. Finally, we output the response body to the client. Package library: Zend Framework