I'm working on a module that takes a form submission and posts it to a rest api, using the webform validator module's hooks. I'm trying to debug what's going wrong, and I have the following code, which correctly displays $data and $url but nothing for $result (I'm assuming it's null?).
I'm new to drupal and I wonder what I'm doing wrong, with the http_request that it comes back null, or what else I can do to debug.
$options = array( data => $data, method => 'POST'); //verify $data $errors['item_2'] = $data; $errors['item_3'] = $url $result = drupal_http_request($url, $options); // display the returned JSON result as a form error $errors['item_1'] = json_decode($result);