本文整理汇总了PHP中Rest::post_resource_multipart方法的典型用法代码示例。如果您正苦于以下问题:PHP Rest::post_resource_multipart方法的具体用法?PHP Rest::post_resource_multipart怎么用?PHP Rest::post_resource_multipart使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Rest
的用法示例。
在下文中一共展示了Rest::post_resource_multipart方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: post_job
public static function post_job($job_request, $job_data)
{
$uri = Resources::$BASEURI . "/jobs";
$result = null;
if ($job_data != null) {
$job_request_arr = array("data" => $job_request, "content-type" => "text/xml", "encoding" => "utf8", "is-file-attachment" => false, "filename" => null);
$job_data_arr = array("data" => $job_data, "content-type" => "application/zip", "encoding" => "binary", "is-file-attachment" => true, "filename" => "data.zip");
$data = array("job-request" => $job_request_arr, "job-data" => $job_data_arr);
return Rest::post_resource_multipart($uri, $data);
} else {
$data = $job_request;
$content_type = "text/xml";
return Rest::post_resource($uri, $data, $content_type);
}
}