如何在wp_remote_ *下重写此代码?

I am trying to rewrite the curl query under the wordpress methods (wp_remote_get / wp_remote_post) but nothing works out, how to do it correctly?

$postData = array(
    'grant_type' => 'authorization_code',
    'code' => $ortext_code,
    'client_id' => $ortext_id,
    'client_secret' => $ortext_passwd
);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
curl_setopt($ch, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);
$response = curl_exec($ch);
curl_close($ch);
$response = json_decode($response);
if (is_object($response)) {
    return $response;
}
return false;