better support without using composer
This commit is contained in:
@@ -30,6 +30,12 @@ And then run:
|
||||
php composer.phar install
|
||||
```
|
||||
|
||||
Include the library in your project with:
|
||||
|
||||
```php
|
||||
require 'vendor/autoload.php';
|
||||
````
|
||||
|
||||
### Creating Request
|
||||
So you're probably wondering how using Unirest makes creating requests in PHP easier, let's look at a working example:
|
||||
|
||||
|
||||
7
lib/Unirest.php
Normal file
7
lib/Unirest.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
require(dirname(__FILE__) . '/Unirest/HttpMethod.php');
|
||||
require(dirname(__FILE__) . '/Unirest/HttpResponse.php');
|
||||
require(dirname(__FILE__) . '/Unirest/Unirest.php');
|
||||
|
||||
?>
|
||||
@@ -1,6 +1,4 @@
|
||||
<?php
|
||||
namespace Unirest;
|
||||
|
||||
class HttpMethod
|
||||
{
|
||||
const DELETE = "DELETE";
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
<?php
|
||||
namespace Unirest;
|
||||
|
||||
class HttpResponse
|
||||
{
|
||||
private $code;
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
<?php
|
||||
namespace Unirest;
|
||||
|
||||
class Unirest
|
||||
{
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user