Spaces:
Sleeping
Sleeping
Download test-server.js from shkumar156/Backend-Object-Detection: direct link, hf CLI and curl.
- Browser
- Download file 540 Bytes
-
https://huggingface.co/spaces/shkumar156/Backend-Object-Detection/resolve/main/test-server.js
- Command line
-
hf download hf://spaces/shkumar156/Backend-Object-Detection/test-server.js
-
curl -L -o test-server.js https://huggingface.co/spaces/shkumar156/Backend-Object-Detection/resolve/main/test-server.js
540 Bytes
| const http = require('http'); | |
| const options = { | |
| hostname: 'localhost', | |
| port: 5000, | |
| path: '/', | |
| method: 'GET' | |
| }; | |
| const req = http.request(options, (res) => { | |
| console.log(`Status: ${res.statusCode}`); | |
| console.log(`Headers: ${JSON.stringify(res.headers)}`); | |
| let data = ''; | |
| res.on('data', (chunk) => { | |
| data += chunk; | |
| }); | |
| res.on('end', () => { | |
| console.log('Response:', data); | |
| }); | |
| }); | |
| req.on('error', (e) => { | |
| console.error(`Problem with request: ${e.message}`); | |
| }); | |
| req.end(); |