OpenTween.HttpConnectionOAuth.GetOAuthCredential C# (CSharp) Method

GetOAuthCredential() private method

private GetOAuthCredential ( Uri uri, string>.Dictionary parameter, NameValueCollection &ret ) : OAuthCredential
uri System.Uri
parameter string>.Dictionary
ret NameValueCollection
return OAuthCredential
        private OAuthCredential GetOAuthCredential(Uri uri, Dictionary<string, string> parameter, out NameValueCollection ret)
        {
            var req = this.CreateRequest("POST", uri, parameter, false);
            AppendOAuthInfo(req, parameter);
            var header = new Dictionary<string, string>();
            string body;
            var code = GetResponse(req, out body, header, false);
            if (code == HttpStatusCode.OK)
            {
                ret = ParseQueryString(body);
                return new OAuthCredential(this.Credential.Consumer, ret["oauth_token"], ret["oauth_token_secret"]);
            }
            else
            {
                throw new Exception(body); // response body
            }
        }