C# Class Smrf.SocialNetworkLib.HttpSocialNetworkUtil

Utility methods for getting social networks via HTTP requests.
Afficher le fichier Open project: 2014-sed-team3/term-project

Méthodes publiques

Méthode 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

Méthode Description
GetHttpWebResponseStreamNoRetries ( HttpWebRequest oHttpWebRequest ) : Stream

Method Details

CreateHttpWebRequest() public static méthode

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

ExceptionIsWebOrJson() public static méthode

public static ExceptionIsWebOrJson ( Exception exception ) : System.Boolean
exception System.Exception
Résultat System.Boolean

ExceptionIsWebOrXml() public static méthode

public static ExceptionIsWebOrXml ( Exception exception ) : System.Boolean
exception System.Exception
Résultat System.Boolean

GetHttpWebResponseStreamWithRetries() public static méthode

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
Résultat Stream

WebExceptionHasHttpStatusCode() public static méthode

public static WebExceptionHasHttpStatusCode ( WebException webException ) : System.Boolean
webException System.Net.WebException
Résultat System.Boolean