Skip to content
/ finch Public
forked from finagle/finch

Purely Functional REST API atop of Finagle

License

Notifications You must be signed in to change notification settings

forthy/finch

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logo

Hi! I'm Finch.io, a thin layer of purely functional basic blocks atop of Finagle for building robust and composable REST APIs.

Quickstart

resolvers += "Finch.io" at "http://repo.konfettin.ru"

libraryDependencies ++= Seq(
  "io" %% "finch" % "0.1.6"
)
def hello(name: String) = new Service[HttpRequest, HttpResponse] = {
  def apply(req: HttpRequest) = for {
    title <- OptionalParam("title")(req)
  } yield Ok(s"Hello, ${title.getOrElse("")} $name!")
}

val endpoint = new Endpoint[HttpRequest, HttpResponse] {
  def route = {
    // routes requests like '/hello/Bob?title=Mr.'
    case Method.Get -> Root / "hello" / name => hello(name)
  }
}

Documentation

Documentation may be found at docs folder of the repository.

Adopters

  • Konfettin - marketplace for event-vendors.
  • Submit a pull-request to include your company/project into the list

License

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this software except in compliance with the License.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.


Build Status Coverage Status

About

Purely Functional REST API atop of Finagle

Resources

License

Stars

Watchers

Forks

Packages

No packages published