• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

JuliaWeb/HttpServer.jl: DEPRECATED! Basic, non-blocking HTTP server in Julia.

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

JuliaWeb/HttpServer.jl

开源软件地址:

https://github.com/JuliaWeb/HttpServer.jl

开源编程语言:

Julia 100.0%

开源软件介绍:

This project is deprecated. Please use HTTP.jl

HttpServer.jl

Build Status codecov.io

HttpServer HttpServer HttpServer HttpServer

This is a basic, non-blocking HTTP server in Julia.

You can write a basic application using just this if you're happy dealing with values representing HTTP requests and responses directly. For a higher-level view, you could use Mux. If you'd like to use WebSockets as well, you'll need to grab WebSockets.jl.

Installation

Use Julia package manager to install this package as follows:

Pkg.add("HttpServer")

Functionality

  • binds to any address and port
  • supports IPv4 & IPv6 addresses
  • supports HTTP, HTTPS and Unix socket transports

You can find many examples of how to use this package in the examples folder.

Example

using HttpServer

http = HttpHandler() do req::Request, res::Response
    Response( ismatch(r"^/hello/",req.resource) ? string("Hello ", split(req.resource,'/')[3], "!") : 404 )
end

server = Server( http )
run( server, 8000 )
# or
run(server, host=IPv4(127,0,0,1), port=8000)

If you open up localhost:8000/hello/name/ in your browser, you should get a greeting from the server.


:::::::::::::
::         ::
:: Made at ::
::         ::
:::::::::::::
     ::
Hacker School
:::::::::::::



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap