Skip to content

Commit

Permalink
Updated version and README for v1.3 release.
Browse files Browse the repository at this point in the history
  • Loading branch information
gebn committed Feb 27, 2014
1 parent f984e65 commit acfa35e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Crackle.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ final class Crackle {
* The version of Crackle in use.
* @var string
*/
const VERSION = '1.2';
const VERSION = '1.3';

/**
* This class should not be instantiated.
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Crackle

Crackle is an easy to use, object-oriented HTTP client.
Crackle is a powerful yet easy to use object-oriented HTTP client for PHP.

## Features

Expand Down Expand Up @@ -36,7 +36,7 @@ use \Crackle\Requests\GETRequest;

$request = new GETRequest('http://icanhazip.com');
$request->fire();
if(!$request->isError()) {
if($request->succeeded()) {
echo $request->getResponse()->getContent();
}
````
Expand All @@ -57,15 +57,15 @@ $request->addField('name[]', 'value2'); // duplicate field names are supported
$request->addFile('upload', POSTFile::factory('photo.jpg'));
$request->addFile('another', POSTFile::factory('document.docx'));
$request->setCallback(function(POSTRequest $request) { // callback is passed the original request object
if(!$request->isError()) {
if($request->succeeded()) {
$request->getResponse()->writeTo('/home/gebn'); // write the response to a file
}
});

$request->fire();
````

### PUT request with NTLM authentication and proxy
### A PUT request with NTLM authentication and proxy

All types of request can be authenticated and proxied:

Expand All @@ -89,7 +89,7 @@ $file->setMimeType('text/plain'); // optional
$request->setFile($file);

$proxy = new SOCKS5Proxy('10.11.12.13'); // HTTP proxies are also supported
$proxy->setCredentials(new NTLMCredentials('username', 'password')); // BASIC and NTLM supported
$proxy->setCredentials(new NTLMCredentials('username', 'password')); // Basic and NTLM supported
$request->setProxy($proxy);

$request->fire();
Expand Down

0 comments on commit acfa35e

Please sign in to comment.