Browse Source

Added allowRedirect utility method

Jan Oris 9 years ago
parent
commit
19f41639c3
1 changed files with 10 additions and 0 deletions
  1. 10 0
      src/Ixudra/Curl/Builder.php

+ 10 - 0
src/Ixudra/Curl/Builder.php

@@ -63,6 +63,16 @@ class Builder {
         return $this->withPackageOption( 'data', $data );
         return $this->withPackageOption( 'data', $data );
     }
     }
 
 
+    /**
+     * Allow for redirects in the request
+     *
+     * @return Builder
+     */
+    public function allowRedirect()
+    {
+        return $this->withCurlOption( 'FOLLOWLOCATION', true );
+    }
+
     /**
     /**
      * Configure the package to encode and decode the request data
      * Configure the package to encode and decode the request data
      *
      *