role stating something abides by some standard
Perl6
Latest commit 17c40ea Feb 10, 2017 @tony-o tony-o committed on GitHub update source-url to reflect new home.
Permalink
Failed to load latest commit information.
lib/HTTP push/append fix Oct 15, 2015
t push Jun 2, 2015
.travis.yml META && Travis May 27, 2015
META.info update source-url to reflect new home. Feb 9, 2017
README.md typo May 27, 2015

README.md

perl6-http-server

role stating something abides by some standard

roles & intentions

HTTP::Server

Callable $sub

This is the argument you can provide to any of the methods below

sub ($req, $res) { 
  qw<do some stuff>;  
}

handlers: method handler(Callable $sub) {...}

handler subs are meant to be called when a request is complete by both headers and body

after: method after(Callable $sub) {...}

after subs are meant to be called when a response is complete and sent

middleware: method middleware(Callable $sub) {...}

middleware subs are meant to be called when request headers are complete

listen: method listen {...}

listen is telling the server to start up and start accepting connections

HTTP::Request

provides a generic method header(*@headers) to retrieve headers in a case insensitive way

also provides some generic attributes for the class that should be present in any decent HTTP::Request

HTTP::Response

should provide methods close($data?, :$force? = False) and write($data)

also provides some generic attributes for the class that should be present in any decent HTTP::Response