@pelicanplatform/web-client
v0.0.6
Published
Pelican web client
Downloads
2
Readme
Pelican Web Client
Installation
npm i @pelicanplatform/web-client
Usage
import Client from "@pelicanplatform/web-client";
const discoveryUrl = "https://osg-htc.org" // Example discovery URL used for OSDF
const filePath = "/example/file/path.txt" // Example file path
const webClient = new Client(discoveryUrl);
try {
webClient.getFile(filePath) // Downloads file to path.txt
} catch (e) {
pass
}
Example usage can be found here:
https://github.com/PelicanPlatform/web-client/blob/main/website/src/app/page.tsx