The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Net::WebSocket::HTTP_R - logic for HTTP::Request & HTTP::Response

SYNOPSIS

Client:

    my $resp = HTTP::Response->parse_string($http_response);

    my $handshake = Net::WebSocket::Handshake::Client->new( .. );

    Net::WebSocket::HTTP_R::handshake_consume_response( $handshake, $resp );

Server:

    my $req = HTTP::Request->parse_string($http_request);

    my $handshake = Net::WebSocket::Handshake::Server->new( .. );

    Net::WebSocket::HTTP_R::handshake_consume_request( $handshake, $req );

DESCRIPTION

Net::WebSocket is agnostic as to which tools an implementor may use to parse HTTP headers. CPAN offers a number of options for doing this, and different applications may have varying reasons to prefer one or the other—or an entirely different approach altogether.

This module provides convenient logic for the HTTP::Request and HTTP::Response CPAN modules. Any implementation that uses one of these modules (or a compatible implementation) can use Net::WebSocket::HTTP_R and save a bit of time.