Effect.gen(function* () {
const client = yield* HttpClient.HttpClient;
const response = yield* client.get(
"https://support.staffbase.com/hc/en-us/article_attachments/360009159412/access-code-password-recovery-code.csv"
);
const lines = yield* Effect.scoped(
pipe(
response.stream,
Stream.decodeText("utf-8"),
Stream.splitLines,
Stream.take(4),
Stream.runCollect
)
);
const array = Chunk.toReadonlyArray(lines);
yield* Effect.log(array);
});
Effect.gen(function* () {
const client = yield* HttpClient.HttpClient;
const response = yield* client.get(
"https://support.staffbase.com/hc/en-us/article_attachments/360009159412/access-code-password-recovery-code.csv"
);
const lines = yield* Effect.scoped(
pipe(
response.stream,
Stream.decodeText("utf-8"),
Stream.splitLines,
Stream.take(4),
Stream.runCollect
)
);
const array = Chunk.toReadonlyArray(lines);
yield* Effect.log(array);
});