Hello Jon,
your code is giving me two errors in the last two lines.
(fragment of Main.scala):52: error: ambiguous reference to overloaded
definition,
both method fromInputStream in object Source of type
(java.io.InputStream)scala.io.Source
and method fromInputStream in object Source of
Guys,
Dont use scala.io.Source its very broken under the hood in current
versions of Scala (according to paulp). Its already fixed in the trunk
of 2.8 however (again, according to paulp).
Cheers, Tim
On 15 Oct 2009, at 11:09, GA wrote:
Hello Jon,
your code is giving me two errors
Both errors are because you broke up the line before the parenthesis.
-
GAmy_li...@me.com wrote:
Hello Jon,
your code is giving me two errors in the last two lines.
(fragment of Main.scala):52: error: ambiguous reference to overloaded
definition,
both
this should work:
def post(url:URL, toPost:String):String = url.openConnection match {
case conn: HttpURLConnection = {
conn.setRequestMethod(POST)
conn.setDoOutput(true)
conn.connect
conn.getOutputStream.write(toPost.getBytes())
oh, if you want to parse directly into xml replace
Source.fromInputStream(conn.getInputStream).getLines.mkString
with
XML.load(conn.getInputStream)
On Oct 14, 2:32 pm, jon jonhoff...@gmail.com wrote:
this should work:
def post(url:URL, toPost:String):String = url.openConnection match {
Checkout this: http://databinder.net/dispatch/About
Easily the most rocking HTTP library in scala-land.
Cheers, Tim
On 14 Oct 2009, at 19:35, jon wrote:
oh, if you want to parse directly into xml replace
Source.fromInputStream(conn.getInputStream).getLines.mkString
with
On Wed, Oct 14, 2009 at 4:55 PM, Timothy Perrett timo...@getintheloop.euwrote:
Checkout this: http://databinder.net/dispatch/About
Easily the most rocking HTTP library in scala-land.
Just about everything N8han touches rocks... wish I could get him to touch
Lift.
Cheers, Tim
On 14 Oct