<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          http4sScala 的 HTTP 服務(wù)接口

          聯(lián)合創(chuàng)作 · 2023-09-29 08:52

          http4s 是一個小型的 Scala 接口,用于處理 HTTP 服務(wù)。相當于 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.")
          }
          瀏覽 25
          點贊
          評論
          收藏
          分享

          手機掃一掃分享

          編輯 分享
          舉報
          評論
          圖片
          表情
          推薦
          點贊
          評論
          收藏
          分享

          手機掃一掃分享

          編輯 分享
          舉報
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  国产欧美在线精品日韩 | 亚洲成人在线操 | 天堂AV2014 | 成人AV麻豆系列 | 欧美大屌肏屄在线视频 |