. * * * The author of this software is Mashape, Inc. * For any question or feedback please contact us at: support@mashape.com * */ require_once(dirname(__FILE__) . "/../init/init.php"); require_once(dirname(__FILE__) . "/../exceptions/mashapeClientException.php"); require_once(dirname(__FILE__) . "/urlUtils.php"); class HttpMethod { const DELETE = 0; const GET = 1; const POST = 2; const PUT = 3; } class HttpClient { public static function call($url, $httpMethod, $token, $parameters) { if (empty($parameters)) { $parameters = array(); } else { // Remove null parameters $keys = array_keys($parameters); for ($i = 0;$i array( 'ignore_errors' => true, 'method' => $httpMethod, 'content' => $data ) ); $context = stream_context_create($opts); $response = @file_get_contents($finalUrl, false, $context); return $response; } } ?>