1) Row 387 in WebClient.fan Now: catch throw IOErr("Invalid HTTP response")
catch throw IOErr("Invalid HTTP response")
Better: catch(Err e){ throw IOErr("Invalid HTTP response",e) }
catch(Err e){ throw IOErr("Invalid HTTP response",e) }
Without we not have info about cause of WebClient.getIn fail.
WebClient.getIn
2) Idea: add method getJson:
getJson
Obj? getJson(){ JsonInStream(getIn).readJson }
3) Why I cant retrieve mtgox ticker?
Write in fansh:
using web WebClient(`https://mtgox.com/api/1/BTCUSD/ticker`).getStr
Result:
sys::IOErr: Invalid HTTP response cause: java.net.SocketTimeoutException: Read timed out
I can get urls from other host but not from mtgox.com.
1) Row 387 in WebClient.fan Now
Good idea, I pushed a change
2) Idea: add method
This a dependency issue, JSON is in util and web doesn't have a dependency on util.
It looks like you are using HTTPS there, which we don't support at the moment
2) Extension medhods may fix this problem.
Extension methods would probably use util behind the covers.
Login or Signup to reply.
Akcelisto Wed 12 Sep 2012
1) Row 387 in WebClient.fan Now:
catch throw IOErr("Invalid HTTP response")
Better:
catch(Err e){ throw IOErr("Invalid HTTP response",e) }
Without we not have info about cause of
WebClient.getIn
fail.2) Idea: add method
getJson
:3) Why I cant retrieve mtgox ticker?
Write in fansh:
Result:
I can get urls from other host but not from mtgox.com.
brian Thu 13 Sep 2012
Good idea, I pushed a change
This a dependency issue, JSON is in util and web doesn't have a dependency on util.
It looks like you are using HTTPS there, which we don't support at the moment
Akcelisto Thu 13 Sep 2012
2) Extension medhods may fix this problem.
DanielFath Thu 13 Sep 2012
Extension methods would probably use util behind the covers.