Native 'setMashapeKey' method for X-Mashape-Key header
This commit is contained in:
12
README.md
12
README.md
@@ -112,7 +112,13 @@ $response = Unirest\Request::post("http://httpbin.org/post", $headers, $body);
|
||||
|
||||
### Authentication
|
||||
|
||||
Passing a username, password *(optional)*, defaults to Basic Authentication:
|
||||
First, if you are using [Mashape][mashape-url]:
|
||||
```php
|
||||
// Mashape auth
|
||||
Unirest\Request::setMashapeKey('<mashape_key>');
|
||||
```
|
||||
|
||||
Otherwise, passing a username, password *(optional)*, defaults to Basic Authentication:
|
||||
|
||||
```php
|
||||
// basic auth
|
||||
@@ -279,7 +285,9 @@ By default is `true`.
|
||||
|
||||
----
|
||||
|
||||
Made with ♥ from the [Mashape](https://www.mashape.com/) team
|
||||
Made with ♥ from the [Mashape][mashape-url] team
|
||||
|
||||
[mashape-url]: https://www.mashape.com/
|
||||
|
||||
[license-url]: https://github.com/Mashape/unirest-php/blob/master/LICENSE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user