|
|
|
@ -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(); |
|
|
|
|
|
|
|
|
|