/home/techb158/ileadtechnology.com/SSM/vendor/rmccue/requests/docs
NameSizeModeActions
authentication-custom.md12870644editdlrm
authentication.md9250644editdlrm
goals.md11060644editdlrm
hooks.md26280644editdlrm
proxy.md5270644editdlrm
README.md8100644editdlrm
usage-advanced.md26680644editdlrm
usage.md39170644editdlrm
why-requests.md77130644editdlrm
Edit: /home/techb158/ileadtechnology.com/SSM/vendor/rmccue/requests/docs/authentication.md (925B)
Authentication ============== Many requests that you make will require authentication of some type. Requests includes support out of the box for HTTP Basic authentication, with more built-ins coming soon. Making a Basic authenticated call is ridiculously easy: ```php $options = array( 'auth' => new Requests_Auth_Basic(array('user', 'password')) ); Requests::get('http://httpbin.org/basic-auth/user/password', array(), $options); ``` As Basic authentication is usually what you want when you specify a username and password, you can also just pass in an array as a shorthand: ```php $options = array( 'auth' => array('user', 'password') ); Requests::get('http://httpbin.org/basic-auth/user/password', array(), $options); ``` Note that POST/PUT can also take a data parameter, so you also need that before `$options`: ```php Requests::post('http://httpbin.org/basic-auth/user/password', array(), null, $options); ```