소스 검색

Added allowRedirect utility method

Jan Oris 9 년 전
부모
커밋
19f41639c3
1개의 변경된 파일10개의 추가작업 그리고 0개의 파일을 삭제
  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
      *