diff --git a/includes/common.inc b/includes/common.inc
index 339a69b..c564054 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -759,7 +759,8 @@ function drupal_access_denied() {
  *   (optional) An array that can have one or more of the following elements:
  *   - headers: An array containing request headers to send as name/value pairs.
  *   - method: A string containing the request method. Defaults to 'GET'.
- *   - data: A string containing the request body, formatted as
+ *   - data: An array or object containing the values for the request body or a
+ *     string containing the request body, formatted as
  *     'param=value&param=value&...'; to generate this, use http_build_query().
  *     Defaults to NULL.
  *   - max_redirects: An integer representing how many times a redirect
@@ -923,6 +924,11 @@ function drupal_http_request($url, array $options = array()) {
     $path .= '?' . $uri['query'];
   }
 
+  // Convert array or object $options['data'] to query string.
+  if (is_array($options['data']) || is_object($options['data'])) {
+    $options['data'] = http_build_query($options['data']);
+  }
+
   // Only add Content-Length if we actually have any content or if it is a POST
   // or PUT request. Some non-standard servers get confused by Content-Length in
   // at least HEAD/GET requests, and Squid always requires Content-Length in
