Wouldn't it be better to call again `curl_exec( $ch )` after setting `CURLOPT_CUSTOMREQUEST` conditionally, depending on "RetryUrlCheckWithGet"? That would avoid letting the user call that API with the new argument.