How can I construct an HTTPS POST with drupal_http_request? I want to do a post request to an HTTPS server address... I have this example code that demonstrates sending a POST request -

$data = 'name=value&amp;name1=value1';

$options = array(
                'method' =&gt; 'POST',
                'data' =&gt; $data,
                'timeout' =&gt; 15,
                'headers' =&gt; array('Content-Type' =&gt; 'application/x-www-form-urlencoded'),
        );

$result = drupal_http_request('http://somewhere.com', $options);


and also on drupal_http_request, there is this code -

case 'https':
  // ***************
  // Note: Only works when PHP is compiled with OpenSSL support.
  // ***************
  $port = isset($uri['port']) ? $uri['port'] : 443;
  $socket = 'ssl://' . $uri['host'] . ':' . $port;
  $options['headers']['Host'] = $uri['host'] . ($port != 443 ? ':' . $port : '');
  break;


to demonstrate sending a POST to an HTTPS connection. Problem is, I can't figure out out to implement the HTTPS options in the POST example code above. Can someone please help me and explain how to do this? I'm quite new to PHP code writing and Drupal and could definitely use the guidance. The drupal_http_request documentation are great as an index, but it doesn't help you a lot if you want to learn things from scratch.

edit- 

after your comment's, i got to this code -

    $data = 'access_token=455754fhnaI&amp;href=fb&amp;template=You have people waiting to play with you, play now!';

$options = array(
                'method' =&gt; 'POST',
                'data' =&gt; $data,
                'timeout' =&gt; 15,
                'headers' =&gt; array('Content-Type' =&gt; 'application/x-www-form-urlencoded'),
        );

$result = drupal_http_request('https://graph.facebook.com/1000721/notifications?', $options);


but its still dosen't work... if i post via FIREFOX poster with this patten -

https://graph.facebook.com/1000080521/notifications?
     access_token=45575FpHfhnaI&amp; 
     href= fb &amp; 
     template=You have people waiting to play with you, play now!


it's working... so i am probably not constructing the request properly in drupal... thanks a lot everyone... really hope someone could help me  figure this out...
You should only need to set it in the protocol.

$result = drupal_http_request('https://somewhere.com', $options);


Parameters


$url:
A string containing a fully qualified URI.

array $options:
(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 &#039;GET&#039;.
data: A string containing the request body, formatted as
&#039;param=value&amp;param=value&amp;...&#039;. Defaults to NULL.
max_redirects: An integer representing how many times a redirect
may be followed. Defaults to 3.
timeout: A float representing the maximum number of seconds the function
call may take. The default is 30 seconds. If a timeout occurs, the error
code is set to the HTTP_REQUEST_TIMEOUT constant.
context: A context resource created with stream_context_create().