title: How does path method work in akka-http
body: <p>This is more of a Scala question but inspired by this http-scala example.</p>
  
  <pre><code>val route =
        path("hello") {
          get {
            complete(HttpEntity(ContentTypes.`text/html(UTF-8)`, "&lt;h1&gt;Say hello to akka-http&lt;/h1&gt;"))
          }
        }
  </code></pre>
  
  <p>Based on example <code>path</code> seems like it could be a curried method that takes <code>String</code> as first argument and <code>Route</code> as second although I do not see such implementation in the API. Could someone enlighten me how this works?</p>
  
  <p>Link to docs: <a href="http://doc.akka.io/api/akka-http/current/akka/http/javadsl/server/Directives" rel="nofollow noreferrer">http://doc.akka.io/api/akka-http/current/akka/http/javadsl/server/Directives</a>$.html#path(segment:String,inner:java.util.function.Supplier[akka.http.javadsl.server.Route]):akka.http.javadsl.server.Route</p>