Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5969519
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:14:33+00:00 2026-05-22T20:14:33+00:00

Could anybody help me, and explain what is :/ and then ~ in scala,

  • 0

Could anybody help me, and explain what is :/ and then ~ in scala, example:

json = http(:/("api.twitter.com") / "1/users/show.json" <<? Map("screen_name" -> "aloiscochard") >~ { _.getLines.mkString })

from: http://aloiscochard.blogspot.com/2011/05/simple-rest-web-service-client-in-scala.html

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T20:14:34+00:00Added an answer on May 22, 2026 at 8:14 pm

    In the code that you link to, note the import dispatch._. This imports the dispatch library.

    In that library we find an object :/ that has an apply method, so that’s what :/("api.twitter.com") means.

    Also, there is no ~ in the code, either–only a >~. In Scala, any group of symbols is a method name, which can be used as an operator. So >~ must be a method on something.

    Looking around, we find that HandlerVerbs defines a >~ method that will “Handle response as a scala.io.Source, in a block.”

    To understand what the code does in detail, you need to understand the dispatch library, which I don’t.

    This library seems to be very DSL-heavy. As such, it may be an excellent choice if you are doing lots and lots of dispatch work (because dispatching hopefully can be done in an intuitive and clean way). But it may be a horrible choice for one-off usage, since you have to be quite familiar with the library to understand what it might be doing (due to the choice of very short method names like >~).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Could anybody explain, why next code isn't compiling? I'm creating a partially-specialized Map and
I was wondering if anybody could help me with a method of creating a
I am new to php and was wondering if anybody could help me with
Could anybody be so kind to give me a simple example of reification in
Could anybody explain to me the process of uploading to and downloading form and
Could anybody give an example to demonstrate the usage of the Invariant Culture ?
there is a list of ruby gems for twitter could anybody recommend me one
Could anybody help me to list Some Good Sites that are describing about Complete
Could anybody help me make a proper regular expression from a bunch of text
Could anybody help me figure out the syntax of the code below? AddonInfo {

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.