Spaces:
Runtime error
Runtime error
Download tests/parse.ts from Dragoning/bingo-going: direct link, hf CLI and curl.
- Browser
- Download file 460 Bytes
-
https://huggingface.co/spaces/Dragoning/bingo-going/resolve/main/tests/parse.ts
- Command line
-
hf download hf://spaces/Dragoning/bingo-going/tests/parse.ts
-
curl -L -o parse.ts https://huggingface.co/spaces/Dragoning/bingo-going/resolve/main/tests/parse.ts
460 Bytes
| import { promises as fs } from 'fs' | |
| import { join } from 'path' | |
| import { parseHeadersFromCurl } from '@/lib/utils' | |
| (async () => { | |
| const content = await fs.readFile(join(__dirname, './fixtures/curl.txt'), 'utf-8') | |
| const headers = parseHeadersFromCurl(content) | |
| console.log(headers) | |
| const cmdContent = await fs.readFile(join(__dirname, './fixtures/cmd.txt'), 'utf-8') | |
| const cmdHeaders = parseHeadersFromCurl(cmdContent) | |
| console.log(cmdHeaders) | |
| })() | |