summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpurplecode <niespammnie@gmail.com>2013-12-08 19:43:20 +0100
committerpurplecode <niespammnie@gmail.com>2013-12-08 19:43:20 +0100
commit082a651599ab37c68c6f1d701fb9fbfcb1eceefe (patch)
tree72c5cb6dbc3d816a58b3b0fc7e605d405a44e99c
parentb3dd84112bc841f071d4df0345cef5e8194fc148 (diff)
downloadphp.curl-082a651599ab37c68c6f1d701fb9fbfcb1eceefe.zip
php.curl-082a651599ab37c68c6f1d701fb9fbfcb1eceefe.tar.gz
php.curl-082a651599ab37c68c6f1d701fb9fbfcb1eceefe.tar.bz2
Update README.md
-rw-r--r--README.md31
1 files changed, 31 insertions, 0 deletions
diff --git a/README.md b/README.md
index 3cfab18..639a824 100644
--- a/README.md
+++ b/README.md
@@ -18,4 +18,35 @@ To install PCurl, use the following composer `require` statement:
```
+# Usage
+
+Simple GET
+```
+$pcurl = new PCurl('http://www.google.pl');
+$response = $cut->get('/');
+```
+
+Simple GET via HTTPS with certificate verification (more examples in test package)
+```
+$pcurl = new PCurl('https://www.google.pl');
+$cut->useSSLCertificate(<path to crt/pem file>);
+$response = $cut->get('/');
+```
+and a similar example without it
+```
+$pcurl = new PCurl('https://www.google.pl');
+$cut->ignoreSSLCertificate();
+$response = $cut->get('/');
+```
+
+Sample POST
+```
+$pcurl = new PCurl('http://some.fancy.page');
+$cut->proxy(host, port);
+$cut->auth(user, pass);
+$cut->header('Cache-Control: no-cache');
+$cut->contentType('application/xml');
+$response = $cut->get('/');
+```
+
Enjoy!