Retrieve a worker file
client.Workers.GetFile(ctx, filePath, query) (*Response, error)
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
package main
import (
"context"
"fmt"
"github.com/stainless-sdks/handinger-go"
"github.com/stainless-sdks/handinger-go/option"
)
func main() {
client := handinger.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.Workers.GetFile(
context.TODO(),
"scratchpad/plan.md",
handinger.WorkerGetFileParams{
WorkerID: "t_org_123_w_01HZY2ZJQ8G7K42W2D7WF6V4GM",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response)
}