Merge branch release/21.7.5 of zentao/zentaopms (#10955)

This commit is contained in:
刘刚
2025-08-15 08:20:32 +08:00
committed by Gitfox
+27
View File
@@ -77,6 +77,33 @@ class rest
return $resp;
}
/**
* Patch method.
*
* @param string $url
* @param array $data
* @param array $headers
* @access public
* @return object
*/
public function patch($url, $data = array(), $headers = array())
{
$headers['Accept'] = 'application/json';
$headers['Content-Type'] = 'application/json';
$data = json_encode($data);
$resp = requests::patch($this->base . $url, $headers, $data, array());
try
{
$resp->body = json_decode($resp->body);
}
catch(Exception $e)
{
}
return $resp;
}
/**
* Put method.
*