Converting curl requests to use wp_remote_* api.