Methods to Add a Header to a curl Request

[ad_1]

curl is a type of nice utilities that is been round seemingly endlessly and has limitless use instances. As of late I discover myself utilizing curl to batch obtain recordsdata and take a look at APIs. Typically 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: software/json' 
 -H 'Model: 1'

You possibly can add a number of headers with a number of -H makes use of. Header format is normally [key]: [value].

  • Convert XML to JSON with JavaScript
  • Create a Sheen Logo Effect with CSS
  • Degradable SELECT onChange

    Every time I am going to Google Analytics I discover a slight flicker within the dropdown listing space. I see a button seem for the shortest period of time and the poof! Gone. What that tells me is that Google is making their website operate…

  • Comment Preview Using MooTools

    Remark previewing is an superior addition to any weblog. I’ve seen actually easy remark previewing and a few actually complicated remark previewing. The next is a tutorial on creating very primary remark previewing utilizing MooTools. The XHTML You possibly can arrange your XHTML any means you need.


[ad_2]

Leave a Reply

Your email address will not be published. Required fields are marked *