summaryrefslogtreecommitdiff
path: root/lib/httpclient.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-09-15 20:29:41 -0400
committerEvan Prodromou <evan@status.net>2009-09-15 21:12:59 -0400
commit20dd0db7049209a5f43697d8bba8eadb63736bce (patch)
tree2a0345051f6b70e8ba10a3106b2f2932e745f315 /lib/httpclient.php
parentd44bc16ee989af7f5ebbd6a40edcc7a4d90902a0 (diff)
move httputil to httpclient
Diffstat (limited to 'lib/httpclient.php')
-rw-r--r--lib/httpclient.php80
1 files changed, 80 insertions, 0 deletions
diff --git a/lib/httpclient.php b/lib/httpclient.php
new file mode 100644
index 000000000..5c1f4f3e1
--- /dev/null
+++ b/lib/httpclient.php
@@ -0,0 +1,80 @@
+<?php
+/**
+ * Laconica, the distributed open-source microblogging tool
+ *
+ * Utility for doing HTTP-related things
+ *
+ * PHP version 5
+ *
+ * LICENCE: This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @category Action
+ * @package Laconica
+ * @author Evan Prodromou <evan@controlyourself.ca>
+ * @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 <evan@controlyourself.ca>
+ * @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)
+ {
+ }
+}