| 1 |
<?php |
| 2 |
|
| 3 |
namespace SyncBasalam\Services\Api; |
| 4 |
|
| 5 |
defined('ABSPATH') || exit; |
| 6 |
|
| 7 |
class PatchApiService extends AbstractApiService |
| 8 |
{ |
| 9 |
protected function executeRequest(array $request) |
| 10 |
{ |
| 11 |
return wp_remote_request($request['url'], [ |
| 12 |
'method' => 'PATCH', |
| 13 |
'body' => $request['data'], |
| 14 |
'headers' => $request['headers'], |
| 15 |
'timeout' => 10, |
| 16 |
]); |
| 17 |
} |
| 18 |
|
| 19 |
public function send(string $url, array $data = [], array $headers = []): array |
| 20 |
{ |
| 21 |
return $this->run($url, $data, $headers); |
| 22 |
} |
| 23 |
} |