GET web api method from a Wordpress PHP script
I'm working on relaying the information that the formcraft plugin dumps into a GET web api method. The information from the formcraft plugin is saved into the variable $_REQUEST.
Formcraft calls the handler.php when submitting a form and this is the code (within the handler.php) I'm currently working with:
?php
$url = 'http://x.x.x.x/Get_VacationRequest/';
$jsonData = json_encode($_REQUEST);
$response = wp_remote_get( $url, $jsonData );
?
I'm debugging my WEB APIs and waiting for a request but so far nothing.
Any help would be greatly appreciated. Thanks.
Topic wp-remote-get web-services php plugins Wordpress
Category Web