Role::...sponse(3pm)
π NAME π
okay so bestie, gather round, because this is Role::REST::Client::Response β literally the Response class for REST β¨ she's the whole vibe when your HTTP call comes back and you need to know what happened.
πΈ VERSION πΈ
this queen is sitting pretty at version 0.23 π
β¨ SYNOPSIS β¨
here's how you summon her, no cap:
my $res = Role::REST::Client::Response->new(
code => '200',
response => HTTP::Response->new(...),
error => 0,
data_callback => sub { sub { ... } },
);
π¦ ATTRIBUTES π¦
π code
the HTTP status code of the request, fr fr. that lil number that tells you if you ate or if you flopped π
π response
an HTTP::Response object. use this when you need more tea than just the status and the content β she's holding everything, bestie. use her if you need more information than status and content. π
π
error
the error description that the user agent hands back when the HTTP status code is 500 or higher π so like, server said nope. and if you want the deets, you can call $res->response->content for more detail. more detail may be found by calling "$res->response->content".
β failed
true if the request didn't succeed. that's it. that's the whole thing. if it's true, it's giving "we don't talk about that" π
π data
the deserialized data β¨ the good stuff, the payload, the moment. but heads up bestie β it returns an empty hashref if the response was unsuccessful, so don't come for her when it's empty, she told you π
π BUGS π
found a bug? got a feature request? not me gatekeeping β please report any bugs or feature requests to bug-role-rest-client at rt.cpan.org, or through the web interface at:
http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Role-REST-Client
she wants to hear from you, fr fr π«Ά
π AUTHOR π
Kaare Rasmussen <kaare at cpan dot org> β the icon, the legend, the moment π
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2018 by Kaare Rasmussen.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. so like, go off, share the love, it's free π
and that's the whole page bestie, tysm for reading π this was Role::...sponse(3pm) from the User Contributed Perl Documentation, built with perl v5.28.0, dated 2018-11-09 β¨ mwah, stay slaying, drink water, and always check your status codes π
π
π¦ where this page comes from
- debian bookworm: librole-rest-client-perl 0.23-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: librole-rest-client-perl 0.23-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: librole-rest-client-perl 0.23-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: librole-rest-client-perl 0.23-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms