Scala 的 HTTP 服务接口 http4s

码农软件 · 软件分类 · 网络工具包 · 2019-02-26 20:13:20

软件介绍

http4s 是一个小型的 Scala 接口,用于处理 HTTP 服务。相当于 Ruby 的 Rack、Python 的 WSGI、Haskell 的 WAI 和 Java 的 Servlet。

示例代码:

// Make your model safe and streaming by using a scalaz-stream Process
def getData(req: Request): Process[Task, String] = ???

val service: HttpService = {
  // Wire your data into your service
  case GET -> Root / "streaming" => Ok(getData(req))

  // You can use helpers to send any type of data with an available Writable[T]
  case GET -> Root / "synchronous" => Ok("This is good to go right now.")
}

本文地址:https://www.codercto.com/soft/d/201.html

遗传算法原理及应用

遗传算法原理及应用

周明、孙树栋 / 国防工业出版社 / 1999-6 / 18.0

一起来看看 《遗传算法原理及应用》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

在线进制转换器
在线进制转换器

各进制数互转换器

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码