getting raw/csv/json data from a curl call?

Asked by Sandy Walsh

If I issue something like:

http://mygraphite.com:8080/render?from=-1d&target=foo.data&format=json

from the browser I get back beautiful json data, but if I do

curl http://mygraphite.com:8080/render?from=-1d&target=foo.data&format=json

from the cmdline, I always get back a png.

Is there something I'm doing wrong? Is there a header I should be including?

Question information

Language:
English Edit question
Status:
Solved
For:
Graphite Edit question
Assignee:
No assignee Edit question
Solved by:
Sandy Walsh
Solved:
Last query:
Last reply:
Revision history for this message
David Blackman (blackmad) said :
#1

do you need to quote the url? possible that everything after the first & is
trying to be launched as a new process.

On Tue, Mar 20, 2012 at 10:55 AM, Sandy Walsh <
<email address hidden>> wrote:

> New question #191224 on Graphite:
> https://answers.launchpad.net/graphite/+question/191224
>
> If I issue something like:
>
> http://mygraphite.com:8080/render?from=-1d&target=foo.data&format=json
>
> from the browser I get back beautiful json data, but if I do
>
> curl
> http://mygraphite.com:8080/render?from=-1d&target=foo.data&format=json
>
> from the cmdline, I always get back a png.
>
> Is there something I'm doing wrong? Is there a header I should be
> including?
>
> --
> You received this question notification because you are a member of
> graphite-dev, which is an answer contact for Graphite.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~graphite-dev
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~graphite-dev
> More help : https://help.launchpad.net/ListHelp
>

Revision history for this message
Sandy Walsh (sandy-walsh) said :
#2

bingo! That was it. Thanks!