diff --git a/ApiVisualEditor.php b/ApiVisualEditor.php index 738cd5b498..a75dfb559a 100644 --- a/ApiVisualEditor.php +++ b/ApiVisualEditor.php @@ -27,12 +27,7 @@ class ApiVisualEditor extends ApiBase { } elseif ($params['paction'] === 'save') { // API Posts HTML to Parsoid Service, receives Wikitext, // API Saves Wikitext to page. - $c = curl_init( $parsoid.$page ); - curl_setopt($c, CURLOPT_POST, 1); - curl_setopt($c, CURLOPT_POSTFIELDS, 'content='.$params['html']); - curl_setopt($c, CURLOPT_RETURNTRANSFER, true); - $wikitext = curl_exec($c); - curl_close($c); + $wikitext = Http::post( $parsoid.$page, array( 'postData' => 'content='.$params['html'] ) ); if ( $wikitext ) {