Skip to content

Payload validation #35

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);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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