twifer icon indicating copy to clipboard operation
twifer copied to clipboard

Order of arguments of reqCurl call in request2

Open frkly opened this issue 2 years ago • 0 comments

function request($method, $req, $params = false) This $params must be used as postfields when $method is POST and as queries when $method is GET.

function request2($method, $req, $params = false) Same here.

$result = $this->reqCurl($method, $url, null, $headers, $params); The third argument of reqCurl is queries and the fifth argument is postfields. Regardless of whether $method is GET or POST, $queries is always NULL and $params is treated as postfields.

This is probably a bug; GET request2 with params does not work.

frkly avatar Feb 12 '23 02:02 frkly