summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to '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!