From: Evan Prodromou Date: Thu, 26 Mar 2009 19:26:19 +0000 (-0400) Subject: Start a common library for HTTP client stuff X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=d44bc16ee989af7f5ebbd6a40edcc7a4d90902a0;p=quix0rs-gnu-social.git Start a common library for HTTP client stuff --- diff --git a/lib/httputil.php b/lib/httputil.php new file mode 100644 index 0000000000..5c1f4f3e11 --- /dev/null +++ b/lib/httputil.php @@ -0,0 +1,80 @@ +. + * + * @category Action + * @package Laconica + * @author Evan Prodromou + * @copyright 2009 Control Yourself, Inc. + * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 + * @link http://laconi.ca/ + */ + +if (!defined('LACONICA')) { + exit(1); +} + +/** + * Utility class for doing HTTP-related stuff + * + * We make HTTP calls in several places, and we have several different + * ways of doing them. This class hides the specifics of what underlying + * library (curl or PHP-HTTP or whatever) that's used. + * + * @category HTTP + * @package Laconica + * @author Evan Prodromou + * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 + * @link http://laconi.ca/ + */ + +class HTTPResponse +{ + var $code = null; + var $headers = null; + var $body = null; +} + +class HTTPClientUtil +{ + function __construct() + { + } + + function head($url, $headers) + { + } + + function get($url, $headers) + { + } + + function post($url, $headers, $body) + { + } + + function put($url, $headers, $body) + { + } + + function delete($url, $headers) + { + } +}