Skip to content

Order of arguments of reqCurl call in request2 #4

Description

@frkly

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions