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

Code

Code

Charles Petzold / Microsoft Press / 2000-10-21 / USD 29.99

Paperback Edition What do flashlights, the British invasion, black cats, and seesaws have to do with computers? In CODE, they show us the ingenious ways we manipulate language and invent new means of ......一起来看看 《Code》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试