C# Class Smrf.SocialNetworkLib.HttpSocialNetworkUtil

Utility methods for getting social networks via HTTP requests.
Datei anzeigen Open project: 2014-sed-team3/term-project

Public Methods

Method Description
CreateHttpWebRequest ( String url, String userAgent, Int32 timeoutMs ) : HttpWebRequest
ExceptionIsWebOrJson ( Exception exception ) : System.Boolean
ExceptionIsWebOrXml ( Exception exception ) : System.Boolean
GetHttpWebResponseStreamWithRetries ( String url, HttpStatusCode httpStatusCodesToFailImmediately, RequestStatistics requestStatistics, String userAgent, Int32 timeoutMs, ReportProgressHandler reportProgressHandler, CheckCancellationPendingHandler checkCancellationPendingHandler ) : Stream
WebExceptionHasHttpStatusCode ( WebException webException ) : System.Boolean

Private Methods

Method Description
GetHttpWebResponseStreamNoRetries ( HttpWebRequest oHttpWebRequest ) : Stream

Method Details

CreateHttpWebRequest() public static method

public static CreateHttpWebRequest ( String url, String userAgent, Int32 timeoutMs ) : HttpWebRequest
url String
userAgent String
timeoutMs System.Int32
return System.Net.HttpWebRequest

ExceptionIsWebOrJson() public static method

public static ExceptionIsWebOrJson ( Exception exception ) : System.Boolean
exception System.Exception
return System.Boolean

ExceptionIsWebOrXml() public static method

public static ExceptionIsWebOrXml ( Exception exception ) : System.Boolean
exception System.Exception
return System.Boolean

GetHttpWebResponseStreamWithRetries() public static method

public static GetHttpWebResponseStreamWithRetries ( String url, HttpStatusCode httpStatusCodesToFailImmediately, RequestStatistics requestStatistics, String userAgent, Int32 timeoutMs, ReportProgressHandler reportProgressHandler, CheckCancellationPendingHandler checkCancellationPendingHandler ) : Stream
url String
httpStatusCodesToFailImmediately HttpStatusCode
requestStatistics RequestStatistics
userAgent String
timeoutMs System.Int32
reportProgressHandler ReportProgressHandler
checkCancellationPendingHandler CheckCancellationPendingHandler
return Stream

WebExceptionHasHttpStatusCode() public static method

public static WebExceptionHasHttpStatusCode ( WebException webException ) : System.Boolean
webException System.Net.WebException
return System.Boolean