Skip to content
This repository
Browse code

Merge pull request #20 from primetimesolutions/master

Added section for extra HTTP headers
  • Loading branch information...
commit 252fd8cdf0d9717327463f9c0dcd328024e04dda 2 parents ae1788d + af10d54
Johnny Broadway authored January 04, 2013

Showing 1 changed file with 16 additions and 0 deletions. Show diff stats Hide diff stats

  1. 16  README.textile
16  README.textile
Source Rendered
@@ -59,3 +59,19 @@ class Song extends ActiveResource {
59 59
     var $extra_params = '?key=123456789';
60 60
 }
61 61
 </pre>
  62
+
  63
+h2. Extra Http Headers
  64
+
  65
+If you need to add extra http request headers you can set $request_headers
  66
+
  67
+<pre>
  68
+<?php
  69
+
  70
+require_once ('ActiveResource.php');
  71
+
  72
+class Song extends ActiveResource {
  73
+    var $site = 'http://localhost:3000/';
  74
+    var $element_name = 'songs';
  75
+    var $request_headers = array("x-api-key: some-api-key-here");
  76
+}
  77
+</pre>

0 notes on commit 252fd8c

Please sign in to comment.
Something went wrong with that request. Please try again.