CodeExplorer addPostFiles example
if (!\
in_array($request->
getMethod(),
['GET', 'HEAD'
], TRUE
)) { if (NULL !==
$content =
$request->
getContent()) { $request_options['body'
] =
$content;
} else { if ($files =
$request->
getFiles()) { $request_options['multipart'
] =
[];
$this->
addPostFields($request->
getParameters(),
$request_options['multipart'
]);
$this->
addPostFiles($files,
$request_options['multipart'
]);
} else { $request_options['form_params'
] =
$request->
getParameters();
} } } if (!
empty($headers)) { $request_options['headers'
] =
$headers;
}