Sha256: 25ef84ae5fcdd5904bc42c6c01df87e3b035d863a1f9932d8ca42aeaa38becf0

Contents?: true

Size: 1.06 KB

Versions: 1

Compression:

Stored size: 1.06 KB

Contents

# net-http-server

* [Homepage](https://github.com/postmodern/net-http-server#readme)
* [Issues](https://github.com/postmodern/net-http-server/issues)
* [Documentation](https://rubydoc.info/gems/net-http-server)

## Description

{Net::HTTP::Server} is a pure Ruby HTTP server.

## Features

* Pure Ruby.
* Supports Streamed Request/Response Bodies.
* Supports Chunked Transfer-Encoding.
* Provides a [Rack](https://github.com/rack/rack#readme) Handler.

## Examples

Simple HTTP Server:

```ruby
require 'net/http/server'
require 'pp'

Net::HTTP::Server.run(:port => 8080) do |request,stream|
  pp request

  [200, {'Content-Type' => 'text/html'}, ['Hello World']]
end
```

Use it with Rack:

```ruby
require 'rack/handler/http'

Rack::Handler::HTTP.run app
```

Using it with `rackup`:

```shell
$ rackup -s HTTP
```

## Requirements

* [parslet](http://kschiess.github.io/parslet/) ~> 1.0
* [gserver](https://rubygems.org/gems/gserver) ~> 0.0

## Install

```shell
$ gem install net-http-server
```

## Copyright

Copyright (c) 2011-2022 Hal Brodigan

See {file:LICENSE.txt} for details.

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
net-http-server-0.2.3 README.md