|
|
|
|
|
by cemerick
5317 days ago
|
|
It's been a long time since I touched Scala — and I never used it for web stuff at the time anyway — but is this really typical? It's mostly an absurd comparison (equivalent to Fibonacci or something), and a tangent besides, but in Clojure: (slurp "http://somesite.com/some/url")
That gives me the response as a string. If I want a binary stream: (clojure.java.io/input-stream "http://somesite.com/some/url")
The same functions work for URLs, URIs, Files, and strings that describe them. |
|
BlueEyes is a framework for writing high performance web services. For it's use cases you care whether you're getting or putting. Thus it is explicit. Similarly, you care about performance, and so don't want to parse strings if you can help it -- thus you set the host once rather than parsing a URL.
For a pure ease-of-use library Dispatch is probably the best, if you can figure out the syntax (see earlier discussion). In Dispatch you can write something like
I forget how you read into a string. Probably change >>> to >>@!#$$T%^@#$% or similar.