2

I am currenlty reading the book Scala in Action and while reading I'm trying to do the programming exercises. However, I'm stuck now on chapter 6.3 where I have to use Scalaz.

The thing is, the http module of Scalaz 6.0.3 is used. In this chapter I should only be able to do a GET request and later the idea is to build upon the project and make it a little more complex.

The problem I'm facing is that, I'm using Scala 2.11.2, so when I try to use Scalaz 6.0.3, the dependency can not be found. I guess that is because 6.0.3 doesn't support Scala 2.11.2. So, I wish to use Scaalaz 7.0.1. However, the HTTP module doesn't exist in 7.0.1, so I can't even compile my project because I have statements like: import scalaz.http._.

Furthermore, in the code, some values like Request object, and Response object are not found because in the example code, as far as I see, they are imported from scalaz.http._.

So, basically, what I'm asking is, can anyone direct me to some kind of tutorial? Or at least direct me to a changelog where I can see where the objects are now located?

Thank you!

Marin
  • 861
  • 1
  • 11
  • 27

1 Answers1

3

From github, when describing the changes in version 7, it explicitly says that

scalaz.{http, geo} dropped.

You can either downgrade to a lower version or use some alternative, as scalaz-http-client seems to offer.

Jaffa
  • 12,442
  • 4
  • 49
  • 101
  • Thank you for the answer. Yes, I've seen that the module has been deprecated. I was wondering that maybe they have re-organised the project, but kept the functionalities. Thank you for the link to the alternative, however, it say's that it's a work in progress and it doesn't specify how to include in build.sbt. – Marin Aug 25 '14 at 13:12
  • I don't know either, sorry. I think they just imported the source from the version 6 and are working on this. Otherwise find another tool that does the job. I don't know much of scala so I won't be able to help you further. And for `scalaz.http`, it's not deprecated, it's now been dropped, which means in version 6 it was maybe already deprecated. – Jaffa Aug 25 '14 at 13:15
  • Ok, I'll try to find something else then. Thank you! – Marin Aug 25 '14 at 13:18
  • Don't forget to accept the answer then, and ask another question if you want to know something not asked in your original question. – Jaffa Aug 25 '14 at 13:24