0

I'm submitting a cURL request that looks something like this:

curl -s -X GET http://google.com

The response I am supposed to be getting back is a json response.

Easy, right?

Instead I'm getting the json response back intermixed with several cURL progress bars.

Example:

% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current                                 Dload  Upload   Total   Spent    Left  Speed
0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100    62  100    36  100    26    560    404 --:--:-- --:--:-- --:--:--   562

Why is this happening and how do I get it to stop?

Even when I redirect the output to a file, I still get this progress bar information intermixed with the json output.

Any help here would be great!

Etan Reisner
  • 77,877
  • 8
  • 106
  • 148
  • 2
    What `curl` version, what platform? Is it possible that you have an alias or shell function named `curl` that adds options behind the scenes? To rule that out, invoke with `$(command -v curl) ...`. – mklement0 May 05 '15 at 22:21
  • Version: curl 7.37.1 (x86_64-apple-darwin14.0) libcurl/7.37.1 SecureTransport zlib/1.2.5 Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smtp smtps telnet tftp Features: AsynchDNS GSS-Negotiate IPv6 Largefile NTLM NTLM_WB SSL libz Platform: OS X 10.10.3 – Trevor Nomi May 06 '15 at 16:54
  • Looks like adding this to the end of my cURL request works, "2>/dev/null". I thought I tried that before posting and didn't work, but it seems to be working now. thanks! – Trevor Nomi May 06 '15 at 16:57

0 Answers0