Permalink
Browse files

Fixed issue regarding parsing request body on query POST API. (#2447)

  • Loading branch information...
1 parent 2862235 commit 2e32c4121b0a753aeb0023009596e0067ea07abb @francares francares committed on GitHub Jul 14, 2017
Showing with 9 additions and 2 deletions.
  1. +9 −2 engine/src/main/scala/cromwell/webservice/CromwellApiService.scala
@@ -77,13 +77,20 @@ trait CromwellApiService {
path("workflows" / Segment / Segment / "logs") { (version, possibleWorkflowId) =>
get { metadataBuilderRequest(possibleWorkflowId, (w: WorkflowId) => GetLogs(w)) }
} ~
- path("workflows" / Segment / "query") { version =>
- (post | get) {
+ path("workflows" / Segment / "query") { _ =>
+ get {
parameterSeq { parameters =>
extractUri { uri =>
metadataQueryRequest(parameters, uri)
}
}
+ } ~
+ post {
+ entity(as[Seq[Map[String, String]]]) { parameterMap =>
+ extractUri { uri =>
+ metadataQueryRequest(parameterMap.flatMap(_.toSeq), uri)
+ }
+ }
}
} ~
encodeResponse {

0 comments on commit 2e32c41

Please sign in to comment.