Saturday, August 3, 2024
HomeProgrammingAdd a Header to a curl Request

Add a Header to a curl Request


curl is a type of nice utilities that is been round seemingly perpetually and has limitless use instances. Nowadays 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: software/json' 
 -H 'Model: 1'

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

  • Being a Dev Dad

    I get requested a great deal of questions daily however I am at all times shocked that they are not often questions on code and even tech — lots of the questions I get are extra about non-dev stuff like what my workplace is like, what software program I exploit, and oftentimes…

  • 5 HTML5 APIs You Didn’t Know Existed

    If you say or learn “HTML5”, you half anticipate unique dancers and unicorns to stroll into the room to the tune of “I am Horny and I Know It.”  Are you able to blame us although?  We watched the basic APIs stagnate for thus lengthy {that a} fundamental characteristic…

  • MooTools Kwicks Plugin
  • NSFW Blocker Using MooTools and CSS

    One in every of my responsible pleasures is scoping out the newest superstar gossip from PerezHilton.com, DListed.com, and JoBlo.com. Sadly, these websites sometimes put up NSFW photos which makes checking these websites on lunch an enormous gamble — a visit to HR’s workplace might be only a click on away. Since…


RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments