JMAP-Tester

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

        - add a means to test the Tester, then do so
        - add a means to supply hand-crafted JSON to $tester->request
        - switch from JSON to JSON::XS

0.106     2025-12-11 09:17:48+11:00 Australia/Melbourne
        - add an "ident" property to the Tester, which will show up in logging

0.105     2025-12-09 11:44:18+11:00 Australia/Melbourne
        - add a (temporary!) second arg to ->download to allow setting the
          Accept header
        - convert the LWP-based UA to use keepalive
        - add get_client_session to get the session without reconfiguring

0.104     2025-06-11 13:28:56-04:00 America/New_York
        - add a TO_JSON method to the Sentence class
        - include ->sentences, not ->items in default diagnostics (which allows
          smarter diagnostic dumpers to filter based on the class)

0.103     2023-01-11 21:24:00-05:00 America/New_York
        - update distribution metadata
        - bump required Perl to v5.14.0

lib/JMAP/Tester/UA/LWP.pm  view on Meta::CPAN

use experimental 'signatures';

use Carp ();
use Future;

has lwp => (
  is   => 'ro',
  lazy => 1,
  default => sub ($self) {
    require LWP::UserAgent;
    my $lwp = LWP::UserAgent->new(keep_alive => 1);
    $lwp->cookie_jar({});

    $lwp->default_header('Content-Type' => 'application/json');

    if ($ENV{IGNORE_INVALID_CERT}) {
      $lwp->ssl_opts(SSL_verify_mode => 0, verify_hostname => 0);
    }

    return $lwp;
  },



( run in 1.831 second using v1.01-cache-2.11-cpan-39bf76dae61 )