Skip to content

Payload validation #35

@alex10fan

Description

@alex10fan

CURLOPT_POSTFIELDS by default accepts strings and flat (1-dimensional) arrays.

Update payload validation of Curl->sendRequest method to allow arrays or let user to set payload manually using curl options (do not set payload if it is empty).

Without that it's impossible to post files.

$payload['file'] = new \CURLFile($file, $mimeType);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions