download a csv-file in julia

584 views
Skip to first unread message

Martin Klemann

unread,
Sep 3, 2013, 7:02:27 AM9/3/13
to julia...@googlegroups.com
Hello,

i’m really new to julia and using network within code also. I’m trying
to download a file (csv) from a given path
(http://www.gw2spidy.com/api/v0.9/csv/all-items/all). How do i do this?
I think a “connect” to the site is a first step resulting in Pipe(open,
0 bytes waiting).
Can someone please point me in the right direction?

Thanks, Martin

Ivar Nesje

unread,
Sep 3, 2013, 7:58:25 AM9/3/13
to julia...@googlegroups.com, ph0...@arcor.de
If you are not going to program with a raw TCP connection you need to use a library that implements some protocol. The link you give uses the HTTP and you need something that knows how to speak HTTP. HTTPClient might point you in the right direction, but I have not tried it. 

John Myles White

unread,
Sep 3, 2013, 8:36:02 AM9/3/13
to julia...@googlegroups.com
On some platforms, I believe download("http://www.gw2spidy.com/api/v0.9/csv/all-items/all", "foobar.csv") will do what you need.

 -- John

Martin Klemann

unread,
Sep 3, 2013, 9:29:30 AM9/3/13
to julia...@googlegroups.com
Am 03.09.2013 13:58, schrieb Ivar Nesje:
> If you are not going to program with a raw TCP connection you need to
> use a library that implements some protocol. The link you give uses the
> HTTP and you need something that knows how to speak HTTP. HTTPClient
> <http://docs.julialang.org/en/latest/packages/packagelist/#id120> might
> point you in the right direction, but I have not tried it.
>
> kl. 13:02:27 UTC+2 tirsdag 3. september 2013 skrev Martin Klemann følgende:
>
> Hello,
>
> i’m really new to julia and using network within code also. I’m trying
> to download a file (csv) from a given path
> (http://www.gw2spidy.com/api/v0.9/csv/all-items/all
> <http://www.gw2spidy.com/api/v0.9/csv/all-items/all>). How do i do
> this?
> I think a “connect” to the site is a first step resulting in Pipe(open,
> 0 bytes waiting).
> Can someone please point me in the right direction?
>
> Thanks, Martin
>
I try it with HTTPClient but get an error with the given example from
https://github.com/amitmurthy/HTTPClient.jl/tree/master/test .

using HTPPClient.HTTPC
HTTPC.post("http://requestb.in/rbx6udrb", "")

results in

error compiling post: error compiling put_post: error compiling
_put_post: error compiling setup_easy_handle: could not load module
libcurl: no error


An additional „using LibCURL“ give me the same error.

Martin Klemann

unread,
Sep 3, 2013, 10:13:30 AM9/3/13
to julia...@googlegroups.com
This error only happens under a windows environment. Seems julia didn't
found libcurl. Any suggestion for a standard search path from julia for
the lib?

Reply all
Reply to author
Forward
0 new messages