Net::API::REST::RC - Return Code Object for Net::APi::REST
my $rc = Net::API::REST::RC->new( code => 401, message => 'Your token has expired', );
In your api, you can return a Return Code object, which provides both the return code and some descriptive message.
Th object stringifies to the "code" set.
The purpose of this module is to have an object that contains not only the return code, but also some message for the end user.
my $rc = Net::API::REST::RC->new( code => 401, message => 'Your token has expired', ); print( "$rc\n" ); # 401
Returns the value for "code"
Sets or gets the http return code, such as 200, or 401. See the Net::API::REST::Status module for all possible return code.
200
401
A descriptive message that can be passed along to the end user.
Jacques Deguest <jack@deguest.jp>
Net::API::REST, Net::API::REST::Request, Net::API::REST::Response, Net::API::REST::Query
Copyright (c) 2018-2021 DEGUEST Pte. Ltd.
You can use, copy, modify and redistribute this package and associated files under the same terms as Perl itself.
To install Net::API::REST, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::API::REST
CPAN shell
perl -MCPAN -e shell install Net::API::REST
For more information on module installation, please visit the detailed CPAN module installation guide.