Role::...sponse(3pm)

πŸ“¦
version 0.23 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

πŸ’– 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 πŸ’–


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