updating README with new info

This commit is contained in:
Ahmad Nassri
2015-01-15 01:46:21 -05:00
parent 3591292c3e
commit 8dcb11e0a6

View File

@@ -120,11 +120,11 @@ $response = Unirest\Request::get("http://httpbin.org/get", null, null, "username
### Request Object
```php
Unirest\Request::get($url, $headers = array(), $parameters = NULL, $username = NULL, $password = NULL)
Unirest\Request::post($url, $headers = array(), $body = NULL, $username = NULL, $password = NULL)
Unirest\Request::put($url, $headers = array(), $body = NULL, $username = NULL, $password = NULL)
Unirest\Request::patch($url, $headers = array(), $body = NULL, $username = NULL, $password = NULL)
Unirest\Request::delete($url, $headers = array(), $body = NULL, $username = NULL, $password = NULL)
Unirest\Request::get($url, $headers = array(), $parameters = null, $username = null, $password = null)
Unirest\Request::post($url, $headers = array(), $body = null, $username = null, $password = null)
Unirest\Request::put($url, $headers = array(), $body = null, $username = null, $password = null)
Unirest\Request::patch($url, $headers = array(), $body = null, $username = null, $password = null)
Unirest\Request::delete($url, $headers = array(), $body = null, $username = null, $password = null)
```
- `url` - Endpoint, address, or uri to be acted upon and requested information from.
@@ -133,6 +133,14 @@ Unirest\Request::delete($url, $headers = array(), $body = NULL, $username = NULL
- `username` - Basic Authentication username
- `password` - Basic Authentication password
You can send a request with any [standard](http://www.iana.org/assignments/http-methods/http-methods.xhtml) or custom HTTP Method:
```php
Unirest\Request::send(Unirest\Methods::LINK, $url, $headers = array(), $body);
Unirest\Request::send('CHECKOUT', $url, $headers = array(), $body);
```
### Response Object
Upon recieving a response Unirest returns the result in the form of an Object, this object should always have the same keys for each language regarding to the response details.