NAME

Net::RDAP::Server::Response - An RDAP response object.

VERSION

version 0.02

DESCRIPTION

Net::RDAP::Server::Response represents a response to an RDAP query. Request handlers that are invoked by Net::RDAP::Server will be passed an object of this type as their argument. They can then manipulate the object as needed to produce the desired response.

Net::RDAP::Server::Response extends HTTP::Response.

ADDITIONAL METHODS

request()

This method returns the corresponding Net::RDAP::Server::Request object.

server()

This method returns the Net::RDAP::Server object that is handling the request.

ok()

This sets the HTTP status code of the response to 200, and also sets an appropriate status message.

error($code, $message)

This sets the HTTP status code of the response to $code and the status message to $message. The body of the response will also be set to an appropriate RDAP error (see Section 6 of RFC 9083).

OVERRIDDEN METHODS

content()

This method works just like the parent method, except that the setter form accepts a hashref that is encoded to JSON. This means that request handlers never need to deal with JSON directly.

AUTHOR

Gavin Brown <gavin.brown@fastmail.uk>

COPYRIGHT AND LICENSE

This software is copyright (c) 2024 by Gavin Brown.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.