Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Order of arguments of reqCurl call in request2 #4

Open
frkly opened this issue Feb 12, 2023 · 0 comments
Open

Order of arguments of reqCurl call in request2 #4

frkly opened this issue Feb 12, 2023 · 0 comments

Comments

@frkly
Copy link

frkly commented Feb 12, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant