Skip to content
This repository has been archived by the owner on Mar 5, 2019. It is now read-only.

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Bogdan Kolbik authored Jul 4, 2016
1 parent dd350e6 commit 1d5f324
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,24 @@

It is a PHP wrapper for curl.

The main idea was just to make HTTP requests with one-liners. And cookie support out-of-the box.

For something more complex you probably want Guzzle.

[![Build Status](https://travis-ci.org/urmaul/httpclient.svg)](https://travis-ci.org/urmaul/httpclient)

## How to use

Like that.

~~~php
HttpClient::from(['useRandomCookieFile' => true])->get('http://httpbin.org/get');

HttpClient::from()->post('http://httpbin.org/post', ['foo' => 'bar']);

HttpClient::from()->download('http://httpbin.org/image/jpeg', 'my-new-image-file.jpeg');
~~~

### Methods

* **head($url, $params = array())** - performs http request to get responce headers.
Expand Down

0 comments on commit 1d5f324

Please sign in to comment.