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]
.
39 Shirts – Leaving Mozilla
In 2001 I had just graduated from a small town high school and headed off to a small town college. I found myself in the quaint computer lab where the substandard computers featured two browsers: Internet Explorer and Mozilla. It was this lab where I fell…
Flashy FAQs Using MooTools Sliders
I often qualify a great website by one that pay attention to detail and makes all of the “little things” seem as though much time was spent on them. Let’s face it — FAQs are as boring as they come. That is, until you…
Source link