diff --git a/README.md b/README.md index 37a044b46..a3c780d33 100755 --- a/README.md +++ b/README.md @@ -51,15 +51,35 @@ Features Installation ------------ -If you want to include it with your project, either [grab it as a zip](https://github.com/rmccue/Requests/zipball/master) or grab it as a tarball: +### Install with Composer +If you're using [Composer](https://github.com/composer/composer) to manage dependencies, you can add Requests with it. + + { + "require": { + "rmccue/requests": ">=1.0" + } + } + +### Install source from GitHub +To install the source code: + + git clone git://github.com/rmccue/Requests.git + +And include it in your scripts: + + require_once '/path/to/Requests/library/Requests.php'; + +### Install source from zip/tarball +Alternatively, you can fetch a [tarball](https://github.com/rmccue/Requests/tarball/master) or [zipball](https://github.com/rmccue/Requests/zipball/master): $ curl https://github.com/rmccue/Requests/tarball/master | tar xzv (or) $ wget https://github.com/rmccue/Requests/tarball/master -O - | tar xzv -Or clone it via Git: +### Using a Class Loader +If you're using a class loader (e.g., [Symfony Class Loader](https://github.com/symfony/ClassLoader)) for [PSR-0](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md)-style class loading: - $ git clone https://github.com/rmccue/Requests.git + $loader->registerNamespace('Requests', 'path/to/vendor/Requests/library'); Documentation diff --git a/composer.json b/composer.json new file mode 100644 index 000000000..fd0df26fe --- /dev/null +++ b/composer.json @@ -0,0 +1,17 @@ +{ + "name": "rmccue/requests", + "description": "A HTTP library written in PHP, for human beings.", + "homepage": "http://github.com/rmccue/Requests", + "license": "ISC", + "keywords": ["http", "idna", "iri", "ipv6", "curl", "sockets", "fsockopen"], + "authors": [ + { + "name": "Ryan McCue", + "homepage": "http://ryanmccue.info" + } + ], + "require": { + "php": ">=5.2" + }, + "type": "library" +}