C# Class Yammer.APIWrapper.HttpUtility

Mostra file Open project: kdavie/Yammer.NET-2.0

Public Methods

Method Description
CreateWebRequest ( WebMethod method, WebProxy proxy, string requestUrl, bool preAuth ) : HttpWebRequest
CreateWebRequest ( WebMethod method, string requestUrl, bool preAuth ) : HttpWebRequest
CreateWebRequest ( string fullUrl, WebMethod method, string nonce, string timeStamp, string sig, string boundary ) : HttpWebRequest
Delete ( string url ) : string
Delete ( string url, NameValueCollection parameters ) : string
EncodeUrl ( string url, NameValueCollection parameters ) : string
Get ( string url ) : string
Get ( string url, NameValueCollection parameters ) : string
GetImage ( string url ) : System.Drawing.Image
GetSignature ( WebMethod method, string url, string &timestamp, string &nonce ) : string
GetWebResponse ( HttpWebRequest request ) : string
GetWebResponse ( HttpWebRequest request, string &location ) : string
Post ( string url, NameValueCollection parameters ) : string
Post ( string url, NameValueCollection parameters, bool getLocationHeader ) : string
Put ( string url, NameValueCollection parameters ) : string
Upload ( string url, NameValueCollection parameters, List files ) : string
WriteFile ( System io, string fileName ) : void
WritePostData ( NameValueCollection parameters, HttpWebRequest request ) : void

Private Methods

Method Description
AddFileHeaders ( List fileNames, string contentBoundary, string contentDisposition, FileInfo fi, int &i, long &postDataSize, int &headerLength, List fileHeaders ) : void
CreateAuthHeader ( WebMethod method, string nonce, string timeStamp, string sig ) : string
CreateWebRequest ( string fullUrl, WebMethod method, string oauthParams ) : HttpWebRequest
CreateWebRequest ( string fullUrl, WebMethod method, string nonce, string timeStamp, string sig ) : HttpWebRequest
GenerateRandomString ( int intLenghtOfString ) : string
GetPostParameters ( NameValueCollection parameters, string contentBoundary, string contentDisposition ) : string
IsValidImage ( Stream imageStream ) : bool
UploadAttachments ( string url, NameValueCollection parameters, List fileNames ) : string
WritePostData ( string postData, Stream requestStream, bool close ) : void

Method Details

CreateWebRequest() public static method

public static CreateWebRequest ( WebMethod method, WebProxy proxy, string requestUrl, bool preAuth ) : HttpWebRequest
method WebMethod
proxy System.Net.WebProxy
requestUrl string
preAuth bool
return System.Net.HttpWebRequest

CreateWebRequest() public static method

public static CreateWebRequest ( WebMethod method, string requestUrl, bool preAuth ) : HttpWebRequest
method WebMethod
requestUrl string
preAuth bool
return System.Net.HttpWebRequest

CreateWebRequest() public static method

public static CreateWebRequest ( string fullUrl, WebMethod method, string nonce, string timeStamp, string sig, string boundary ) : HttpWebRequest
fullUrl string
method WebMethod
nonce string
timeStamp string
sig string
boundary string
return System.Net.HttpWebRequest

Delete() public static method

public static Delete ( string url ) : string
url string
return string

Delete() public static method

public static Delete ( string url, NameValueCollection parameters ) : string
url string
parameters System.Collections.Specialized.NameValueCollection
return string

EncodeUrl() public static method

public static EncodeUrl ( string url, NameValueCollection parameters ) : string
url string
parameters System.Collections.Specialized.NameValueCollection
return string

Get() public static method

public static Get ( string url ) : string
url string
return string

Get() public static method

public static Get ( string url, NameValueCollection parameters ) : string
url string
parameters System.Collections.Specialized.NameValueCollection
return string

GetImage() public static method

public static GetImage ( string url ) : System.Drawing.Image
url string
return System.Drawing.Image

GetSignature() public static method

public static GetSignature ( WebMethod method, string url, string &timestamp, string &nonce ) : string
method WebMethod
url string
timestamp string
nonce string
return string

GetWebResponse() public static method

public static GetWebResponse ( HttpWebRequest request ) : string
request System.Net.HttpWebRequest
return string

GetWebResponse() public static method

public static GetWebResponse ( HttpWebRequest request, string &location ) : string
request System.Net.HttpWebRequest
location string
return string

Post() public static method

public static Post ( string url, NameValueCollection parameters ) : string
url string
parameters System.Collections.Specialized.NameValueCollection
return string

Post() public static method

public static Post ( string url, NameValueCollection parameters, bool getLocationHeader ) : string
url string
parameters System.Collections.Specialized.NameValueCollection
getLocationHeader bool
return string

Put() public static method

public static Put ( string url, NameValueCollection parameters ) : string
url string
parameters System.Collections.Specialized.NameValueCollection
return string

Upload() public static method

public static Upload ( string url, NameValueCollection parameters, List files ) : string
url string
parameters System.Collections.Specialized.NameValueCollection
files List
return string

WriteFile() public static method

public static WriteFile ( System io, string fileName ) : void
io System
fileName string
return void

WritePostData() public static method

public static WritePostData ( NameValueCollection parameters, HttpWebRequest request ) : void
parameters System.Collections.Specialized.NameValueCollection
request System.Net.HttpWebRequest
return void