Explorar o código

Added allowRedirect utility method

Jan Oris %!s(int64=9) %!d(string=hai) anos
pai
achega
19f41639c3
Modificáronse 1 ficheiros con 10 adicións e 0 borrados
  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 );
     }
 
+    /**
+     * 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
      *