Permalink
Browse files

POST support and other improvements

  • Loading branch information...
1 parent c258ef5 commit faa3d7c499f0beb9fb5129c62a4b1c3a2a9d1691 @christianhellsten committed Dec 14, 2010
Showing with 0 additions and 25 deletions.
  1. +0 −25 index.html
View
@@ -1,25 +0,0 @@
-<p>A minimalist <span class="caps">HTTP</span> client for <span class="caps">PHP</span>.</p>
-<h2><span class="caps">GET</span></h2>
-<pre>
- <code>
-$options = array (
- 'debug_log' =&gt; '/tmp/http.log',
- 'follow_redirects' =&gt; false,
- 'connect_timeout' =&gt; 30000,
- 'cookie_jar' =&gt; '/app/tmp/cookies.txt',
- 'proxy' =&gt; 'http-proxy:8080'
-)
-$headers = array('User-Agent' =&gt; 'Googlebot/2.1 ( http://www.googlebot.com/bot.html)');
-$response = HTTP::get('http://google.com', $headers, $options);
- </pre>
-<p></code></p>
-<h2><span class="caps">POST</span></h2>
-<pre>
- <code>
-$parameters = array(
- 'name' =&gt; 'Data',
- 'file' =&gt; "@$file"#(file_get_contents('/tmp/data.txt')) # File upload
-);
-$response = HTTP::post('http://my-files/upload', $parameters)
- </pre>
-<p></code></p>

0 comments on commit faa3d7c

Please sign in to comment.