Home Software How to Add a Header to a curl Request

How to Add a Header to a curl Request

by Delarno
0 comments
How to Download a YouTube Video or Channel

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' \
 ' \
 -H 'accept: application/json' \
 -H 'Version: 1'

You can add multiple headers with multiple -H uses. Header format is usually [key]: [value].

  • CSS vs. JS Animation: Which is Faster?

    CSS vs. JS Animation: Which is Faster?

    How is it possible that JavaScript-based animation has secretly always been as fast — or faster — than CSS transitions? And, how is it possible that Adobe and Google consistently release media-rich mobile sites that rival the performance of native apps? This article serves as a point-by-point…

  • 9 More Mind-Blowing WebGL Demos
  • CSS 3D Folding Animation
  • CSS Fixed Position Background Image

    CSS Fixed Position Background Image

    Backgrounds have become an integral part of creating a web 2.0-esque website since gradients have become all the rage. If you think gradient backgrounds are too cliche, maybe a fixed position background would work for you? It does provide a neat inherent effect by…



Source link

You may also like

Leave a Comment

Booboone

Breaking News on Health, Science, Politic, Science, Entertainment!

 

Edtior's Picks

Latest Articles

@2023 – All Right Reserved. Designed and Developed by booboone.com