Thread Starter
fippy
(@dgilfillan)
just to confirm cURL is enabled and php info shows:
curl
cURL support enabled
cURL Information 7.61.1
Age 4
Features
AsynchDNS Yes
CharConv No
Debug No
GSS-Negotiate No
IDN Yes
IPv6 Yes
krb4 No
Largefile Yes
libz Yes
NTLM Yes
SPNEGO Yes
SSL Yes
SSPI No
Protocols dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, ldaps, pop3, pop3s, rtsp, scp, sftp, smb, smbs, smtp, smtps, telnet, tftp
Host x86_64-redhat-linux-gnu
SSL Version OpenSSL/1.0.2k
ZLib Version 1.2.8
libSSH Version libssh2/1.4.2
Directive Local Value Master Value
curl.cainfo no value no value
Thread Starter
fippy
(@dgilfillan)
when I manually test the two HTTP WordPress functions, they seem to work as expected? I quickly added a test widget to the WordPress dashboard to output the results of a remote get and post request and both return the results I would expect?
/**
* Add a widget to the dashboard.
*
* This function is hooked into the 'wp_dashboard_setup' action below.
*/
function wpexplorer_add_dashboard_widgets() {
wp_add_dashboard_widget(
'wpexplorer_dashboard_widget', // Widget slug.
'Test Functions', // Title.
'wpexplorer_dashboard_widget_function' // Display function.
);
}
add_action( 'wp_dashboard_setup', 'wpexplorer_add_dashboard_widgets' );
/**
* Create the function to output the contents of your Dashboard Widget.
*/
function wpexplorer_dashboard_widget_function() {
echo "<p>Testing wp_remote_get:<p>";
$get_response = wp_remote_get( 'http://httpbin.org/get' );
echo "<pre>" . $get_response ['body'] . "</pre>";
echo "<p>Testing wp_remote_post:<p>";
$post_response = wp_remote_post( 'http://httpbin.org/post' );
echo "<pre>" . $post_response ['body'] . "</pre>";
}
-
This reply was modified 6 years, 11 months ago by
fippy.
Thread Starter
fippy
(@dgilfillan)
I’ve deleted the transients using transient manager plugin and refreshed and appears to be working now…