better support without using composer
This commit is contained in:
@@ -30,6 +30,12 @@ And then run:
|
|||||||
php composer.phar install
|
php composer.phar install
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Include the library in your project with:
|
||||||
|
|
||||||
|
```php
|
||||||
|
require 'vendor/autoload.php';
|
||||||
|
````
|
||||||
|
|
||||||
### 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:
|
||||||
|
|
||||||
|
|||||||
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
|
<?php
|
||||||
namespace Unirest;
|
|
||||||
|
|
||||||
class HttpMethod
|
class HttpMethod
|
||||||
{
|
{
|
||||||
const DELETE = "DELETE";
|
const DELETE = "DELETE";
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace Unirest;
|
|
||||||
|
|
||||||
class HttpResponse
|
class HttpResponse
|
||||||
{
|
{
|
||||||
private $code;
|
private $code;
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace Unirest;
|
|
||||||
|
|
||||||
class Unirest
|
class Unirest
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user