object-sync-for-salesforce icon indicating copy to clipboard operation
object-sync-for-salesforce copied to clipboard

Replace curl with wp_remote methods

Open jonathanstegall opened this issue 7 years ago • 1 comments

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

jonathanstegall avatar May 25 '17 19:05 jonathanstegall

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.

jonathanstegall avatar Jun 22 '17 14:06 jonathanstegall