[support] drupal_http_request returns apache error 400

Scott scott at bscottholmes.com
Sun May 16 17:11:05 UTC 2010


I've decided to to try a different tack, giving up on ajax and/or ahah.
I'm now trying to send my constructed url using
drupal_http_request($url,$header). This results in a 400 error.  I know
the url is correct because I can clip a copy of the string into the
address bar and fetch the resulting json into my browser.  My function
looks like this:

function get_search_results($url) {
  $header = array();
  $header=array ('Content-Type'=>'text/xml');
  $result = drupal_http_request($url,$header);
  drupal_set_message($result->code);
}





More information about the support mailing list