Add module to fetch data (via a proxy) from the website with jsonld
This commit is contained in:
parent
1b06eee15b
commit
352414b29d
17 changed files with 388 additions and 351 deletions
|
@ -148,7 +148,16 @@ export default class ScriptUtils {
|
|||
const data = await ScriptUtils.Download(url, headers)
|
||||
return JSON.parse(data["content"])
|
||||
}
|
||||
|
||||
public static async DownloadFetch(
|
||||
url: string,
|
||||
headers?: any
|
||||
): Promise<{ content: string } | { redirect: string }> {
|
||||
console.log("Fetching", url)
|
||||
const req = await fetch(url, {headers})
|
||||
const data= await req.text()
|
||||
console.log("Fetched", url,data)
|
||||
return {content: data}
|
||||
}
|
||||
public static Download(
|
||||
url: string,
|
||||
headers?: any
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue