Using CURL Instead of HTTP API
Closed this issue · 1 comments
ka215 commented
WordPress comes with an extensive HTTP API that should be used instead of creating your own curl calls. It’s both faster and more extensive. It’ll fall back to curl if it has to, but it’ll use a lot of WordPress’ native functionality first.
https://developer.wordpress.org/plugins/http-api/
Please note: If you're using CURL in 3rd party vendor libraries, that's permitted. It's in your own code unique to this plugin (or any dedicated WordPress libraries) that we need it corrected.
Example(s) from your plugin:
wp-ignitor-1.0.0-beta.2/src/utils.php:198: $raw_html = curl_exec( $ch );
ka215 commented
Improved to use HTTP API method wp_remote_request()
instead of curl.
$raw_html = wp_remote_retrieve_body( wp_remote_request( $get_uri ) );