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 932679
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T20:42:29+00:00 2026-05-15T20:42:29+00:00

I have a script with which I POST data to a server using cURL.

  • 0

I have a script with which I POST data to a server using cURL. When I use an HTML form to POST the same data, the POST looks something like this and all is well:

description=Something&name=aName&xml=wholeBiunchOfData&xslt=moreData

The XML and XSLT are large and change; I would prefer to maintain them in external files. However, the following does not work as I expect;

curl --cookie cjar --cookie-jar cjar --location --output NUL ^
 --data "name=aName&description=Something" ^
    --data "xml=@localFile.xml" ^
 --data "xslt=@localFile.xslt" ^
 http://someUrl.html

I have tried various combinations of the @ and local files without success. How do I POST the contents of a file?

  • 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-05-15T20:42:29+00:00Added an answer on May 15, 2026 at 8:42 pm

    I’d recommend trying the following:

    curl --cookie cjar --cookie-jar cjar --location --output NUL ^
     --data "name=aName&description=Something" ^
        --data-urlencode "xml@localFile.xml" ^
     --data-urlencode "xslt@localFile.xslt" ^
     http://someUrl.html
    

    XML (including stylesheets) will need to be URL-encoded before being made part of a URL.

    You can also use --trace-ascii - as an additional parameter to dump the input and output to standard out for further debugging, and you can find more information on the main man page.

    Hope this helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In a php-script i have a form, method is post, action-attribute is empty, which
Problem background I have a post-commit script for my SVN repository which archives &
I have a script which validates each stage of a form and adds a
I have VB Script which is connected with the my database (SQL Server 2008),
I have a html form which the user inputs values/selects options. After selecting, these
So i'm working on a php script which passes information to a server using
I have a problem while I need to send data using uploadify script. For
I have form where before i was using simple post with <button name=submit id=register
I have a script below which the user logs a php form. There is
I have script which allows to display Bing search results. I can call for

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.