I'm presuming you're using this in windows. The download(url) method places the content of the url into a temporary filename. The function should then return the name of the file in which the content has been placed. Unfortunately, the windows verson of the function seems to have a bug where it does not return the filename. The unix version does.
As a workaround, you can use the download(url, filename) version of the method. So something like: filename = tempname() download(url, filename) The contents of the url will then be in the file represented by filename. Regards - Avik On Tuesday, 6 May 2014 10:20:30 UTC+1, joanenric barcelo wrote: > > That is right, what I want is to get the value of var as you said, ie. > > http://xxx.xxx.xxx.xxx:xx/?request=var > > so, doing > > > julia> dir = "http://xxx.xxx.xxx.xxx:xx/?request=var"; > > julia> a = download(dir) > > julia> println(a) > nothing > > julia> typeof(a) > Nothing (constructor with 1 method) > > > > I am not getting anything. Any ideas so far? Thanks! > > > El sábado, 3 de mayo de 2014 17:17:10 UTC+1, Jameson escribió: >> >> Or use the builtin `download` command. it isn't very fancy, but should >> get the job done. >> >> I'm not sure what matlab means by PARAMS for an HTTP GET, since the >> GET method doesn't take arguments. presumably though, it is rewriting >> the url to `http://xx.xx.xx.xx:xx/?request=value' with quoting for >> request and value as needed >> >> On Sat, May 3, 2014 at 6:19 AM, joanenric barcelo <[email protected]> >> wrote: >> > Thanks Tony for your help. >> > >> > However, I need to use Win XP for working reasons and I cannot manage >> to get >> > it work. I have raised another post with this issue >> > https://groups.google.com/forum/#!topic/julia-users/wPNc8T8lxX8 >> > >> > thanks again!! >> > >> > El miércoles, 30 de abril de 2014 17:57:50 UTC+1, Tony Kelman escribió: >> >> >> >> I'm not sure if the functionality is in base, but presumably one of >> the >> >> http client packages (like https://github.com/loladiro/Requests.jl) >> could do >> >> what you're looking for? >> >> >> >> >> >> On Wednesday, April 30, 2014 8:57:17 AM UTC-7, joanenric barcelo >> wrote: >> >>> >> >>> Hi! >> >>> >> >>> I'm coming from Matlab and I would like to request some information >> >>> through IP connection. Basically, I would like to translate the >> following >> >>> Matlab command >> >>> >> >>> urlread('URL','method',PARAMS) >> >>> >> >>> >> >>> concretely: >> >>> >> >>> urlread('http://xx.xx.xx.xx:xx','Get',{'request','value'}) >> >>> >> >>> >> >>> >> >>> Thanks in advance! >> >>> >> >>> JoanEnric >> >
