C# Class NG.HttpClient.HttpRequest

Basic HttpRequest abstraction. This should not be used directly. Concrete HttpRequests should inherit from this class and must declare how to construct the WWW object. After instantiating an HttpRequest class you must call the Execute method to run the request. Options: useHttps - default: false Set this to use https protocol. timeOut Set this to the number of seconds to elapse before forcing a timeout. retryAttempts - default: 0 Set this to the number of times to retry the request. delayBetweenRetries - default: 0.25f Set this to the number of seconds to elapse before a retry is attempted. Call Cancel() at any time to cancel and dispose of the request. Call GetProgress() to check on the progress of the download. HandleSuccess and HandleError have been set with defaults to report common data about an http request. These methods are virtual so they can be extended or overwritten to serve any needs.
Inheritance: IHttpRequest
Afficher le fichier Open project: Naphier/NGTools

Méthodes publiques

Свойство Type Description
delayBetweenRetries float
resultType ResultData
retryAttempts int
timeOut float
useHttps bool

Protected Properties

Свойство Type Description
_result HttpResult
filePath string
host string
www UnityEngine.WWW

Méthodes publiques

Méthode Description
CanBeDestroyed ( ) : bool
Cancel ( ) : void
Execute ( ) : void
ExecuteCoroutine ( ) : IEnumerator
GetProgress ( ) : float
GetWWW ( ) : WWW
HandleError ( HttpResult result, WWW www ) : void
HandleSuccess ( HttpResult result, WWW www ) : void

Méthodes protégées

Méthode Description
HttpRequest ( string host, string filePath ) : System

Method Details

CanBeDestroyed() public méthode

public CanBeDestroyed ( ) : bool
Résultat bool

Cancel() public méthode

public Cancel ( ) : void
Résultat void

Execute() public méthode

public Execute ( ) : void
Résultat void

ExecuteCoroutine() public méthode

public ExecuteCoroutine ( ) : IEnumerator
Résultat IEnumerator

GetProgress() public méthode

public GetProgress ( ) : float
Résultat float

GetWWW() public abstract méthode

public abstract GetWWW ( ) : WWW
Résultat UnityEngine.WWW

HandleError() public méthode

public HandleError ( HttpResult result, WWW www ) : void
result HttpResult
www UnityEngine.WWW
Résultat void

HandleSuccess() public méthode

public HandleSuccess ( HttpResult result, WWW www ) : void
result HttpResult
www UnityEngine.WWW
Résultat void

HttpRequest() protected méthode

protected HttpRequest ( string host, string filePath ) : System
host string
filePath string
Résultat System

Property Details

_result protected_oe property

protected HttpResult,NG.HttpClient _result
Résultat HttpResult

delayBetweenRetries public_oe property

public float delayBetweenRetries
Résultat float

filePath protected_oe property

protected string filePath
Résultat string

host protected_oe property

protected string host
Résultat string

resultType public_oe property

public ResultData resultType
Résultat ResultData

retryAttempts public_oe property

public int retryAttempts
Résultat int

timeOut public_oe property

public float timeOut
Résultat float

useHttps public_oe property

public bool useHttps
Résultat bool

www protected_oe property

protected WWW,UnityEngine www
Résultat UnityEngine.WWW