Questions tagged [curl]

curl is a data transfer utility used for a multitude of network=related applications (such as scraping data).

cURL (/kə:(r)l/) is a computer software project providing a library and command-line tool for transferring data using various protocols. The cURL project produces two products, libcurl and cURL. It was first released in 1997. The name originally stood for "see URL".

see more @wikipedia and StackOverflow

715 questions
77
votes
8 answers

CURL to download a directory

I am trying to download a full website directory using CURL. The following command does not work: curl -LO http://example.com/ It returns an error: curl: Remote file name has no length!. But when I do this: curl -LO…
Foo
  • 771
47
votes
3 answers

How to send POST with body, headers, and HTTP params using cURL?

I found a lot of examples on how to use simple POST commands in cURL, but I didn't find examples on how to send full HTTP POST commands, which contain: Headers (Basic Authentication) HTTP Params (s=1&r=33) Body Data, some XML string All I found…
user71020
  • 607
26
votes
1 answer

What units does curl use for bandwidth?

curl on the command-line displays progress like this: % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 8 1000M 8 85.2M 0 0 …
Flimm
  • 10,691
11
votes
1 answer

cURL Upload file and send POST data

I have a web server running some PHP that checks for an image (curl -F 'imageName=@myimage') and it also checks the POST data for username=&password=. When the PHP checks _REQUEST I cannot just do: curl -F 'imageName=@myimage'…
flumpb
  • 495
5
votes
1 answer

Where does a file downloaded with CURL go on the file system?

Ive downloaded a file from this site with the following curl command: https://www.modern.ie/en-us/virtualization-tools#downloads # Copy/paste the command below into your terminal to begin downloading all the required files # Don't have cURL or want…
Evanss
  • 1,268
5
votes
1 answer

How do I comment out a line in my .curlrc?

I frequently have to switch between two different auth token request headers, that I keep in my .curlrc as such: -H "X-Auth-Token: 12345678-1234" It would make my life easier, though, if I could just keep both in there, with one of them commented…
Underyx
  • 951
4
votes
1 answer

How to upload file with curl when --data-binary is present in tampered data?

I try to upload files to a popular website, I tampered the http POST requests with Chrome developer tools' "copy as curl" feature. When the upload begins I get this curl command: curl…
4
votes
2 answers

Documentation for mapping CURLOPT_* to CLI flags

I'm working on debugging cURL calls in an application (PHP-based, specifically), and would really like to test identical calls via the command line. The application uses many CURLOPTS, and some of them don't obviously map onto command line…
thelr
  • 93
3
votes
3 answers

Use of curl command via HTTP

Using curl command, how to transfer a file from one location to other via HTTP request?
3
votes
2 answers

No response from CURL at Windows Command Prompt

I've tried following Run cURL commands from Windows console but typing in any curl command returns nothing. See below - I just get back the command prompt. c:\curl>curl curl: try 'curl --help' or 'curl --manual' for more…
3
votes
2 answers

Curl: Difference between 2 ssl commands

I cant tell the difference or when to use one over the other. (Should this be on serverfault?) -E/--cert (SSL) Tells curl to use the specified certificate file when getting a file with HTTPS or FTPS. The certificate must be in PEM format. If…
user3109
3
votes
1 answer

curl: continue and remote-header-name cannot be used together?

I am using curl with both -C - and --remote-name --remote-header-name. If the file exists, I get an error that the existing file cannot be overwritten. Is there a way to work around this? I think this is not an uncommon use case? // Edit: I want to…
3
votes
1 answer

Use cURL with multiple POSTs

I'm trying to use cURL to download the contents of webpages that require forms to get to. In a browser it looks something like this 1.) Login using POST 2.) Pick which page to go to using another POST 3.) Pick another page... using POST 4.) etc..…
3
votes
2 answers

With curl, how can I pass multiple command line parameters in a POST?

I have the following controller: public IActionResult Post([FromQuery] int Width, [FromQuery] int Height, [FromForm] IFormFile Image) With Insomnia / Postman, I can do a post command and pass the width / height parameters in the url. I am trying to…
Thomas
  • 184
3
votes
1 answer

cURL and default CApath / CAcert

I am dealing with a baffling situation regarding cURL and its CApath and CAcert values, as cURL behaves differently for two users on the same system (SUSE 11 SLES). For the first user, cURL fails, and its output shows CAfile is set, but CApath is…
h.mon
  • 131
1
2 3 4