-4.6 C
New York
Monday, December 23, 2024

Methods to Add a Header to a curl Request


curl is a type of nice utilities that is been round seemingly ceaselessly and has limitless use circumstances. Lately I discover myself utilizing curl to batch obtain recordsdata and check APIs. Generally my testing leads me to utilizing totally different HTTP headers in my requests.

So as 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 'settle for: utility/json' 
 -H 'Model: 1'

You’ll be able to add a number of headers with a number of -H makes use of. Header format is normally [key]: [value].


Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles