File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -107,4 +107,28 @@ public function query($query)
107
107
$ this ->applyRequestOptions (["query " => $ query ]);
108
108
return $ this ;
109
109
}
110
+
111
+ /**
112
+ * Ignore all redirects for this request
113
+ *
114
+ * @return $this
115
+ */
116
+ public function withoutRedirects ()
117
+ {
118
+ $ this ->applyRequestOptions (["max_redirects " => 0 ]);
119
+ return $ this ;
120
+ }
121
+
122
+ /**
123
+ * Change proxy for this request
124
+ *
125
+ * @param string $proxy Proxy value for CURLOPT_PROXY
126
+ * @param string $noproxy Comma-separated list of hosts, that do not require proxy
127
+ * @return $this
128
+ */
129
+ public function proxy ($ proxy = null , $ noproxy = null )
130
+ {
131
+ $ this ->applyRequestOptions (["proxy " => $ proxy , "no_proxy " => $ noproxy ]);
132
+ return $ this ;
133
+ }
110
134
}
You can’t perform that action at this time.
0 commit comments