object-sync-for-salesforce
object-sync-for-salesforce copied to clipboard
Replace curl with wp_remote methods
I started a branch for this, but currently it still has errors.
https://github.com/MinnPost/object-sync-for-salesforce/tree/94-wp-http-methods
In previous attempts:
- timeout errors. One possible solution to that is to make the ini value the timeout.
- SSL errors (unclear why that was happening)
-
http_build_query()
errors (unclear why)
In current attempt:
- when the Salesforce authorization expires, it has a PHP error instead of being caught by the log. Not clear why
The thing to note is that it should be possible if we can get the parameters right, because usually the wp_remote
methods end up using curl anyway.
The possible deal breaker is that WordPress does a lot of stuff with the parameters. It's possible we can't get around that stuff and that is why it breaks in the plugin, but I think we don't know enough yet to establish that.