HF RL Explorer

Task: Get File Size Using Python Requests with HEAD Request

Task: Get File Size Using Python Requests with HEAD Request: a task in Terminal-Lego-15k (Harbor dataset). When working with remote files, you often need to know the file size before downloading. Downloading the entire file just to check its size is inefficient. The HTTP protocol provides a HEAD…

The task

When working with remote files, you often need to know the file size before downloading. Downloading the entire file just to check its size is inefficient. The HTTP protocol provides a `HEAD` request method that retrieves only the headers without the response body, making it perfect for this use case.

Part of PrimeIntellect/Terminal-Lego-15k.