Skip to content

Commit

Permalink
dave - tidy of Body
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddenton committed Jun 8, 2015
1 parent 06a1fd7 commit e4ff348
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/main/scala/io/fintrospect/parameters/Body.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ import org.jboss.netty.handler.codec.http.HttpRequest
import scala.util.Try

class Body private(description: Option[String], paramType: ParamType, location: Location, val example: JsonNode, parse: (String => Try[JsonNode]))
extends RequestParameter[JsonNode]("body", description, paramType, location, parse) with Mandatory[JsonNode] {
override def parseFrom(request: HttpRequest): Option[Try[JsonNode]] = Some(Try(parse(contentFrom(request)).get))
}
extends RequestParameter[JsonNode]("body", description, paramType, location, parse) with Mandatory[JsonNode]

object Body {
private val location = new Location {
Expand Down

0 comments on commit e4ff348

Please sign in to comment.