In the code you are referring to, pay attention to import dispatch._ . This imports the distribution library .
In this library, we find an object :/ that has an apply method, so that means :/("api.twitter.com") .
In addition, the code does not have ~ , or only << 24>. In Scala, any group of characters is the name of a method that can be used as an operator. Therefore >~ should be a method for something.
Looking around, we find that HandlerVerbs defines a >~ method that will "handle the response as scala.io.Source in a block".
To understand what the code does in detail, you need to understand the dispatch library, which I do not do.
This library seems to be a very heavy DSL. Thus, it can be a great choice if you do a lot and a lot of sending work (because the distribution, I hope, can be done in an intuitive and clean way). But this can be a terrible choice for a one-time use, as you must know the library well to understand what it can do (due to the choice of very short method names such as >~ ).
source share