Install curl
curl
is a command-line tool used for transferring data with URL syntax, supporting a variety of protocols such as HTTP, HTTPS etc.
Most OS’s come with curl
installed by default. To check if curl
is installed, open your terminal / command-prompt and run curl --version
If there is no installation, use the following page as a guide on how to install curl
locally:
Install ipfs-car
npm i ipfs-car
)ipfs-car
is a library used to interact with CAR files.Install npx
Run npm i -g npx
. To verify installation run npx --v
For this section you can use the CID that was used in the earlier workshop where you uploaded a file to web3 storage.
Sample Cid: bafybeigoaduaubwscmgx45jrssxrxszy4b2nywvy2mztpsi4sm6ayglshu/shawarma.jpg
https://l1s.saturn.ms/ipfs/{cid}?format=car&dag-scope=entity
{cid}
with the actual CID provided for the exercise.Use the following command. This command will fetch the content, download it, and display the TTFB (time to first byte) in seconds. You should find the file in the same directory that ran the command from.
curl -w "Time to First Byte: %{time_starttransfer}\\n" -o example.car -s "<https://l1s.saturn.ms/ipfs/{cid}?format=car&dag-scope=entity>"
ipfs-car