NAME

WWW::MailboxOrg::JSONRPCRequest - JSON-RPC 2.0 request object

VERSION

version 0.001

SYNOPSIS

use WWW::MailboxOrg::JSONRPCRequest;

my $req = WWW::MailboxOrg::JSONRPCRequest->new(
    method => 'account.get',
    params => { account => 'test@example.tld' },
    id     => 1,
    url    => 'https://api.mailbox.org/v1',
    headers => { 'HPLS-AUTH' => 'session123' },
);

DESCRIPTION

Transport-independent JSON-RPC 2.0 request object.

jsonrpc

JSON-RPC version. Defaults to "2.0".

method

The RPC method name, e.g. "account.get".

params

ArrayRef of positional parameters or HashRef of named parameters.

id

Request ID for correlating responses. Undef for notifications.

url

The endpoint URL for the request.

headers

Hashref of HTTP headers (e.g. HPLS-AUTH).

to_hash

Returns a hashref representation for JSON encoding.

SUPPORT

Issues

Please report bugs and feature requests on GitHub at https://github.com/getty/p5-www-mailboxorg/issues.

IRC

Join #perl-help on irc.perl.org or message Getty directly.

CONTRIBUTING

Contributions are welcome! Please fork the repository and submit a pull request.

AUTHOR

Torsten Raudssus <getty@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2026 by Torsten Raudssus <torsten@raudssus.de> https://raudssus.de/.

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