How to use HttpWebRequest GET method in Twitter API
<p>I am trying to get Status from Twitter Home TimeLine, and it failed.</p>

<p>I have no problem when use POST method when update status, and it worked.
Here, code sample:</p>

<pre><code>$post_body = [System.Text.Encoding]::ASCII.GetBytes("status=" + $status); 
[System.Net.HttpWebRequest] $request = [System.Net.WebRequest]::Create("https://api.twitter.com/1.1/statuses/update.json");
$request.Method = "POST";
$request.Headers.Add("Authorization", $oauth_authorization);
$request.ContentType = "application/x-www-form-urlencoded";
$body = $request.GetRequestStream();
$body.write($post_body, 0, $post_body.length);
$body.flush();
$body.close();
$response = $request.GetResponse();
</code></pre>

<p>But, when use GET method to read Home Timeline , i always get error message.</p>

<pre><code>Exception calling "GetRequestStream" with "0" argument(s): "Cannot send a content-body with this verb-type."
At line:42 char:1
+ $response = $request.GetRequestStream()
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ProtocolViolationException
</code></pre>

<p>Here the code i use:</p>

<pre><code>[System.Net.HttpWebRequest] $request = [System.Net.WebRequest]::Create("https://api.twitter.com/1.1/statuses/home_timeline.json");
$request.Method = "GET";
$request.Headers.Add("Authorization", $oauth_authorization);
$request.ContentType = "application/x-www-form-urlencoded";
$response = $request.GetRequestStream();
</code></pre>

<p>Sorry for my bad english.</p>