readme updated with composer instructions
This commit is contained in:
21
README.md
21
README.md
@@ -9,7 +9,26 @@ Documentation
|
|||||||
### Installing
|
### Installing
|
||||||
Download the PHP library from Github, and require in your script like so:
|
Download the PHP library from Github, and require in your script like so:
|
||||||
|
|
||||||
`require_once './lib/Unirest.php';`
|
`require_once './lib/Unirest/Unirest.php';`
|
||||||
|
|
||||||
|
#### Using Composer
|
||||||
|
|
||||||
|
[Composer](http://getcomposer.org/) is a package manager for PHP.
|
||||||
|
|
||||||
|
In the composer.json file in your project add:
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
{
|
||||||
|
"require" : {
|
||||||
|
"mashape/unirest-php" : "dev-master"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
And then run:
|
||||||
|
|
||||||
|
```
|
||||||
|
php composer.phar install
|
||||||
|
```
|
||||||
|
|
||||||
### Creating Request
|
### Creating Request
|
||||||
So you're probably wondering how using Unirest makes creating requests in PHP easier, let's look at a working example:
|
So you're probably wondering how using Unirest makes creating requests in PHP easier, let's look at a working example:
|
||||||
|
|||||||
@@ -3,12 +3,12 @@
|
|||||||
"description" : "Unirest PHP",
|
"description" : "Unirest PHP",
|
||||||
"keywords" : ["rest", "curl"],
|
"keywords" : ["rest", "curl"],
|
||||||
"type" : "library",
|
"type" : "library",
|
||||||
"homepage" : "http://unireset.io#php",
|
"homepage" : "http://unirest.io#php",
|
||||||
"license" : "MIT",
|
"license" : "MIT",
|
||||||
"authors" : [
|
"authors" : [
|
||||||
{
|
{
|
||||||
"name" : "Mashape",
|
"name" : "Mashape",
|
||||||
"email" : "hey@mashape.com",
|
"email" : "support@mashape.com",
|
||||||
"homepage" : "http://mashape.com"
|
"homepage" : "http://mashape.com"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -23,6 +23,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"support" : {
|
"support" : {
|
||||||
"email" : "hey@mashape.com"
|
"email" : "support@mashape.com"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user