diff --git a/README.md b/README.md index 8ec1577..cfeab60 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ Or edit `composer.json` and add: Example ------- - +Login with Basic Authentication ```php 'Basic ' . $token, - 'Accept' => 'application/json', + $headers = [ + 'Accept' => 'application/json' ]; + if(self::$_authType == self::AUTH_BASIC){ + $headers['Authorization'] = 'Basic ' . $token; + }else{ + $headers['Authorization'] = 'Bearer ' . self::$_token; + } + + return $headers; } } \ No newline at end of file