fr:code:data:web
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Prochaine révision | Révision précédente | ||
| fr:code:data:web [2012/03/23 10:45] – créée wismerheal | fr:code:data:web [2021/02/13 11:23] (Version actuelle) – modification externe 127.0.0.1 | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| ====== Web [En cours de Traduction Wismerheal][WSL] ====== | ====== Web [En cours de Traduction Wismerheal][WSL] ====== | ||
| - | This object allows you to download data. | + | Cet objet vous permet de télécharger des données. |
| - | ===== Functions | + | ===== Fonctions |
| ==== Web ==== | ==== Web ==== | ||
| - | Constructor function. | + | Fonction de construction. |
| - | === Syntax | + | === Syntaxe |
| <code javascript> | <code javascript> | ||
| var myObject = new Web(eventsAndOptions); | var myObject = new Web(eventsAndOptions); | ||
| Ligne 13: | Ligne 13: | ||
| === Arguments === | === Arguments === | ||
| - | - eventsAndOptions - (object) | + | - eventsAndOptions - (object) |
| - | * onFinished - ([[# | + | * onFinished - ([[# |
| - | * onDownloadProgress - ([[# | + | * onDownloadProgress - ([[# |
| - | * onError - ([[# | + | * onError - ([[# |
| - | * file - ([[en: | + | * file - ([[en: |
| === Example === | === Example === | ||
| Ligne 33: | Ligne 33: | ||
| </ | </ | ||
| - | ===== Methods | + | ===== Méthodes |
| ==== download ==== | ==== download ==== | ||
| - | Start downloading. | + | Débute le téléchargement. |
| - | === Syntax | + | === Syntaxe |
| <code javascript> | <code javascript> | ||
| myObject.download(url, | myObject.download(url, | ||
| Ligne 47: | Ligne 47: | ||
| === Arguments === | === Arguments === | ||
| - | - url - (string) | + | - url - (string) |
| - options - (object) options | - options - (object) options | ||
| - | * rawHeaders - (object) | + | * rawHeaders - (object) |
| - | * method - (Method) | + | * method - (Method) |
| - | * postData - (object) post data to send | + | * postData - (object) |
| - | * query - (object) | + | * query - (object) |
| - | * user - (string) | + | * user - (string) |
| - | * password - (string) | + | * password - (string) |
| - | === Returns | + | === Renvoie |
| - | * (Web) this Web | + | * (Web) ce Web |
| === Exceptions === | === Exceptions === | ||
| - | * (OpenFileError) | + | * (OpenFileError) |
| === Notes === | === Notes === | ||
| - | This method is asynchronous, this means that it will return before the data is downloaded. | + | Cette méthode est asynchrone, cela signifie que le renvoi s' |
| - | To known when this is done use the [[# | + | Pour savoir quand le téléchargement est terminé, utilisez l' |
| ==== isDownloading ==== | ==== isDownloading ==== | ||
| - | Returns true if the data is still being downloaded. | + | Renvoie vrai si les données sont toujours en cours de téléchargement. |
| - | === Syntax | + | === Syntaxe |
| <code javascript> | <code javascript> | ||
| myObject.isDownloading(); | myObject.isDownloading(); | ||
| </ | </ | ||
| - | === Returns | + | === Renvoie |
| - | * (boolean) | + | * (boolean) |
| ==== toImage ==== | ==== toImage ==== | ||
| - | Returns the downloaded data as an [[en: | + | Renvoie les données téléchargée comme un [[en: |
| - | === Syntax | + | === Syntaxe |
| <code javascript> | <code javascript> | ||
| myObject.toImage(); | myObject.toImage(); | ||
| </ | </ | ||
| - | === Returns | + | === REnvoie |
| - | * ([[en: | + | * ([[en: |
| === Notes === | === Notes === | ||
| - | You cannot use this method if you specified a destination | + | Vous ne pouvez pas utiliser cette méthode si le chemin de destination |
| ==== toText ==== | ==== toText ==== | ||
| - | Returns the downloaded data as text. | + | Renvoie les données téléchargée comme un texte. |
| - | === Syntax | + | === Syntaxe |
| <code javascript> | <code javascript> | ||
| myObject.toText(encoding); | myObject.toText(encoding); | ||
| Ligne 103: | Ligne 103: | ||
| === Arguments === | === Arguments === | ||
| - | - encoding - ([[en: | + | - encoding - ([[en: |
| - | === Returns | + | === Renvoie |
| - | * (string) | + | * (string) |
| === Notes === | === Notes === | ||
| - | You cannot use this method if you specified a destination | + | Vous ne pouvez pas utiliser cette méthode si le chemin de destination |
| ==== toRawData ==== | ==== toRawData ==== | ||
| - | Returns the downloaded data as [[en: | + | Renvoie les données téléchargées comme une [[en: |
| - | === Syntax | + | === Syntaxe |
| <code javascript> | <code javascript> | ||
| myObject.toRawData(); | myObject.toRawData(); | ||
| </ | </ | ||
| - | === Returns | + | === Renvoie |
| - | * ([[en: | + | * ([[en: |
| === Notes === | === Notes === | ||
| - | You cannot use this method if you specified a destination | + | Vous ne pouvez pas utiliser cette méthode si le chemin de destination |
| ==== cancel ==== | ==== cancel ==== | ||
| - | Cancel the download. | + | Annule le téléchargement. |
| - | === Syntax | + | === Syntaxe |
| <code javascript> | <code javascript> | ||
| myObject.cancel(); | myObject.cancel(); | ||
| </ | </ | ||
| - | === Returns | + | === Renvoie |
| - | * (Web) this Web | + | * (Web) ce Web |
| - | ===== Events | + | ===== Évènements |
| ==== onFinished ==== | ==== onFinished ==== | ||
| - | Called when the data has been downloaded. | + | Appelé quahd les données sont téléchargées. |
| - | === Syntax | + | === Syntaxe |
| <code javascript> | <code javascript> | ||
| myObject.onFinished = function() {}; | myObject.onFinished = function() {}; | ||
| Ligne 155: | Ligne 155: | ||
| ==== onDownloadProgress ==== | ==== onDownloadProgress ==== | ||
| - | Called when the download | + | Appelé quand la progression |
| - | === Syntax | + | === Syntaxe |
| <code javascript> | <code javascript> | ||
| myObject.onDownloadProgress = function(bytesReceived, | myObject.onDownloadProgress = function(bytesReceived, | ||
| Ligne 163: | Ligne 163: | ||
| === Arguments === | === Arguments === | ||
| - | - bytesReceived - (integer) | + | - bytesReceived - (integer) |
| - | - bytesTotal - (integer) total byte count | + | - bytesTotal - (integer) |
| === Example === | === Example === | ||
| Ligne 175: | Ligne 175: | ||
| ==== onError ==== | ==== onError ==== | ||
| - | Called when an error occurs. | + | Appelé quand une erreur survient. |
| - | === Syntax | + | === Syntaxe |
| <code javascript> | <code javascript> | ||
| myObject.onError = function(errorText) {}; | myObject.onError = function(errorText) {}; | ||
| Ligne 183: | Ligne 183: | ||
| === Arguments === | === Arguments === | ||
| - | - errorText - (string) | + | - errorText - (string) |
| === Example === | === Example === | ||
| Ligne 195: | Ligne 195: | ||
| ===== Enumerations ===== | ===== Enumerations ===== | ||
| - | ==== Method | + | ==== Méthode==== |
| - | The download method. | + | La méthode de téléchargement. |
| - | === Values | + | === Valeurs |
| - | - Get: use " | + | - Get: utilisez la méthode |
| - | - Post: use " | + | - Post: utilisez la méthode |
fr/code/data/web.1332499534.txt.gz · Dernière modification : (modification externe)
