Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8627765
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T08:21:47+00:00 2026-06-12T08:21:47+00:00

After the –dump-header writes a file, how to read those headers back into the

  • 0

After the –dump-header writes a file, how to read those headers back into the next request? I would like to read them from a file because there are a number of them.

I tried standard in: cat headers | curl -v -H - ...

I’m actually using the feature in Firebug to "Copy Request Headers" and then saving those to a file. This appears to be the same format.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T08:21:49+00:00Added an answer on June 12, 2026 at 8:21 am

    Since curl 7.55.0

    Easy:

    $ curl -H @header_file https://example.com
    

    … where the header file is a plain text file with an HTTP header on each line. Like this:

    Color: red
    Shoesize: 11
    Secret: yes
    User-Agent: foobar/3000
    Name: "Joe Smith"
    

    Before curl 7.55.0

    curl had no way to bulk change headers like that from a file. They had to be modified one bye one with -H.

    Your best approach with an old curl version is probably to instead write a shell script that gathers all the headers from the file and use them, like:

    #!/bin/sh
    while read line; do
      args="$args -H '$line'";
    done
    curl $args https://example.com
    

    Invoke the script like this:

    $ sh script.sh < header_file
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

after assigning loaded XML data to an array of objects, i would like to
After discovering about Javascript namespaces, I tried to implement them but I run into
After going back to one of 'PHP Login System' test projects, I now need
After inserting new data into a table, I need to select some of the
After looking at some HTML sourses, I found some meaningless file inclusion, for both
After a period of inactivity the first request takes about 5 to 10 secs
After I right-click on a file in Windows (ex: Windows 7 64bit), a pop-up
After I installed Windows 8 perfectly legit statement like this doesn't work anymore: #if
After bringing CardIO (iOS XCode) into my build, I am receiving a link error
After having read Ian Boyd 's constructor series questions ( 1 , 2 ,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.