How to include data-url-encode data using drupal_http_request()?
--data-urlencode just appends ?foo=bar to the end of the URL (encoded of course); drupal_http_request() has no special handling for query strings, it parses them directly from the provided URL with parse_url().

That said, this would be functionally equivalent:

$data = drupal_http_build_query(array('include' =&gt; 'gator'));
$url = 'https://example.com/1/endpoint?' . $data;
drupal_http_request($url);


Request from Drupal:

GET /1/endpoint?include=gator HTTP/1.0
User-Agent: Drupal (+http://drupal.org/)
Host: example.com


Request from cURL:

GET /1/endpoint?include=gator HTTP/1.1
User-Agent: curl/7.30.0
Host: example.com