Retrieve a worker file
client.workers.retrieveFile(stringfilePath, WorkerRetrieveFileParams { workerId } params, RequestOptionsoptions?): Response
GET/api/workers/{workerId}/files/{filePath}
Retrieve a file published from a worker workspace. The runtime route accepts nested paths after /files/.
Retrieve a worker file
import Handinger from 'handinger';
const client = new Handinger({
apiKey: process.env['HANDINGER_API_KEY'], // This is the default and can be omitted
});
const response = await client.workers.retrieveFile('scratchpad/plan.md', {
workerId: 't_org_123_w_01HZY2ZJQ8G7K42W2D7WF6V4GM',
});
console.log(response);
const content = await response.blob();
console.log(content);