Navigation Menu

Skip to content

Commit

Permalink
! httpx: remove MetaUnmarshallers.scala, fold only member into FormDa…
Browse files Browse the repository at this point in the history
…taUnmarshallers.scala
  • Loading branch information
sirthias committed Oct 1, 2013
1 parent ef03bf4 commit ebe3e97
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 37 deletions.
Expand Up @@ -31,7 +31,6 @@ trait Deserializer[A, B] extends (A ⇒ Deserialized[B]) { self ⇒

object Deserializer extends DeserializerLowerPriorityImplicits
with BasicUnmarshallers
with MetaUnmarshallers
with FromStringDeserializers
with FormDataUnmarshallers {

Expand Down
Expand Up @@ -113,6 +113,17 @@ trait FormDataUnmarshallers {
throw new IllegalArgumentException(ex.info.formatPretty.replace("Query,", "form content,"))
}
}

implicit def formUnmarshaller(implicit fdum: Unmarshaller[FormData], mpfdum: Unmarshaller[MultipartFormData]) =
new Unmarshaller[HttpForm] {
def apply(entity: HttpEntity) = fdum(entity).left.flatMap {
case UnsupportedContentType(error1) mpfdum(entity).left.map {
case UnsupportedContentType(error2) UnsupportedContentType(error1 + " or " + error2)
case error error
}
case error Left(error)
}
}
}

object FormDataUnmarshallers extends FormDataUnmarshallers

This file was deleted.

0 comments on commit ebe3e97

Please sign in to comment.