<commit_before>package com.example.http4s.blaze

object ClientExample {

  def getSite() = {

/// code_ref: blaze_client_example
    import org.http4s.Http4s._
    import scalaz.concurrent.Task

    val client = org.http4s.client.blaze.defaultClient

    val page: Task[String] = client.getAs[String](uri("https://www.google.com/"))

    for (_ <- 1 to 2)
      println(page.map(_.take(72)).unsafePerformSync)   // each execution of the Task will refetch the page!

    // We can do much more: how about decoding some JSON to a scala object
    // after matching based on the response status code?
    import org.http4s.Status.NotFound
    import org.http4s.Status.ResponseClass.Successful
    import io.circe.generic.auto._
    import org.http4s.circe.jsonOf

    case class Foo(bar: String)

    // jsonOf is defined for Json4s, Argonuat, and Circe, just need the right decoder!
    implicit val fooDecoder = jsonOf[Foo]
<commit_msg>Fix circe derivation on Scala 2.10.x.<commit_after>package com.example.http4s.blaze

object ClientExample {

  def getSite() = {

/// code_ref: blaze_client_example
    import org.http4s.Http4s._
    import scalaz.concurrent.Task

    val client = org.http4s.client.blaze.defaultClient

    val page: Task[String] = client.getAs[String](uri("https://www.google.com/"))

    for (_ <- 1 to 2)
      println(page.map(_.take(72)).unsafePerformSync)   // each execution of the Task will refetch the page!

    // We can do much more: how about decoding some JSON to a scala object
    // after matching based on the response status code?
    import org.http4s.Status.NotFound
    import org.http4s.Status.ResponseClass.Successful
    import io.circe._
    import io.circe.generic.auto._
    import org.http4s.circe.jsonOf

    case class Foo(bar: String)

    // jsonOf is defined for Json4s, Argonuat, and Circe, just need the right decoder!
    implicit val fooDecoder = jsonOf[Foo]

{'fraction_non_alphanumeric': 0.09864300626304802, 'fraction_numerical': 0.014091858037578288, 'mean_word_length': 3.2131868131868133, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6204789', 'n_tokens_mistral': 635, 'n_tokens_neox': 599, 'n_words': 175}