curl
is one of those great utilities that’s been around seemingly forever and has endless use cases. These days I find myself using curl
to batch download files and test APIs. Sometimes my testing leads me to using different HTTP headers in my requests.
To add a header to a curl
request, use the -H
flag:
curl -X 'GET' \ 'https://nft.api.cx.metamask.io/collections?chainId=1' \ -H 'accept: application/json' \ -H 'Version: 1'
You can add multiple headers with multiple -H
uses. Header format is usually [key]: [value]
.
Being a Dev Dad
I get asked loads of questions every day but I’m always surprised that they’re rarely questions about code or even tech — many of the questions I get are more about non-dev stuff like what my office is like, what software I use, and oftentimes…
Assign Anchor IDs Using MooTools 1.2
One of my favorite uses of the MooTools JavaScript library is the SmoothScroll plugin. I use it on my website, my employer’s website, and on many customer websites. The best part about the plugin is that it’s so easy to implement. I recently ran…