From 8f236e88542c8b65ba8e965dd294871f6e03abea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabrice=20PENHO=C3=8BT?= Date: Mon, 21 Feb 2022 17:16:23 +0100 Subject: [PATCH] =?UTF-8?q?Appel=20local=20aux=20fichiers=20distants=20(si?= =?UTF-8?q?te=20d=C3=A9mo)=20pour=20faciliter=20le=20d=C3=A9ploiement.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/demo/exampleWithCSV.ts | 2 +- src/demo/exampleWithJSON.ts | 5 +++-- src/demo/exampleWithMixedFields.ts | 2 +- src/demo/exampleWithUL.ts | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/demo/exampleWithCSV.ts b/src/demo/exampleWithCSV.ts index cbade83..812fadf 100644 --- a/src/demo/exampleWithCSV.ts +++ b/src/demo/exampleWithCSV.ts @@ -20,7 +20,7 @@ const initialise=async () => // Création d'un convertisseur parsant les données d'un fichier CSV "distant" const converter=new FreeDatas2HTML("CSV"); - converter.parser.setRemoteSource({ url:"http://localhost:8080/datas/elements-chimiques.csv" }); + converter.parser.setRemoteSource({ url:"https://freedatas2html.le-fab-lab.com/datas/elements-chimiques.csv" }); // Parsage des données, qui ne sont pas encore affichées : await converter.run(); diff --git a/src/demo/exampleWithJSON.ts b/src/demo/exampleWithJSON.ts index a786691..51a9398 100644 --- a/src/demo/exampleWithJSON.ts +++ b/src/demo/exampleWithJSON.ts @@ -6,8 +6,9 @@ const initialise=async () => { // Création d'un convertisseur parsant des données transmises en JSON : const converter=new FreeDatas2HTML("JSON"); - // Exemple d'utilisation de headers (bien qu'inutiles ici) : - converter.parser.setRemoteSource({ url: "http://localhost:8080/datas/posts2.json", withCredentials:true, headers: [{ key:"Authorization", value:"Token YWxhZGRpbjpvcGVuc2VzYW1l" }] }); + // Exemple d'utilisation de headers (inutiles ici) : + // converter.parser.setRemoteSource({ url: "https://freedatas2html.le-fab-lab.com/datas/posts2.json", withCredentials:true, headers: [{ key:"Authorization", value:"Token YWxhZGRpbjpvcGVuc2VzYW1l" }] }); + converter.parser.setRemoteSource({ url: "https://freedatas2html.le-fab-lab.com/datas/posts2.json" }); // Parsage des données, qui ne sont pas encore affichées : await converter.run(); diff --git a/src/demo/exampleWithMixedFields.ts b/src/demo/exampleWithMixedFields.ts index 5aad222..ab4c9c5 100644 --- a/src/demo/exampleWithMixedFields.ts +++ b/src/demo/exampleWithMixedFields.ts @@ -7,7 +7,7 @@ const initialise=async () => { // Création d'un convertisseur parsant des données transmises en JSON : const converter=new FreeDatas2HTML("JSON"); - converter.parser.setRemoteSource({ url: "http://localhost:8080/datas/links.json"}); + converter.parser.setRemoteSource({ url: "https://freedatas2html.le-fab-lab.com/datas/links.json"}); // Parsage des données, qui ne sont pas encore affichées : await converter.run(); diff --git a/src/demo/exampleWithUL.ts b/src/demo/exampleWithUL.ts index 7aea3bb..b17e7da 100644 --- a/src/demo/exampleWithUL.ts +++ b/src/demo/exampleWithUL.ts @@ -7,7 +7,7 @@ const initialise=async () => { // Création d'un convertisseur parsant les données d'un fichier CSV "distant" const converter=new FreeDatas2HTML("CSV"); - converter.parser.setRemoteSource({ url:"http://localhost:8080/datas/elements-chimiques.csv" }); + converter.parser.setRemoteSource({ url:"https://freedatas2html.le-fab-lab.com/datas/elements-chimiques.csv" }); // Parsage des données, qui ne sont pas encore affichées : await converter.run(); // On affiche que certains champs :