Home Software Development The way to Add a Header to a curl Request

The way to Add a Header to a curl Request

0
The way to Add a Header to a curl Request

curl is a type of nice utilities that is been round seemingly eternally and has limitless use circumstances. As of late I discover myself utilizing curl to batch obtain recordsdata and take a look at 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 possibly can add a number of headers with a number of -H makes use of. Header format is normally [key]: [value].

  • Reverse Element Order with CSS Flexbox

    CSS is changing into an increasing number of highly effective as of late, virtually to the purpose the place the order of HTML components output to the web page now not issues from a show standpoint — CSS allows you to accomplish that a lot that just about any structure, massive or small, is feasible.  Semantics…

  • Font Replacement Using Cufón