Apache2-API
view release on metacpan or search on metacpan
{ "error": { "code": 401, "message": "Something went wrong" } }
Otherwise, it will send to the client the message as is.
compression_threshold( $integer )
The number of bytes threshold beyond which, the "reply" method will gzip
compress the data returned to the client.
decode_base64( $data )
Given some data, this will decode it using base64 algorithm. It uses
"decode" in APR::Base64 in the background.
decode_json( $data )
This decode from utf8 some data into a perl structure using JSON
If an error occurs, it will return undef and set an exception that can
be accessed with the error method.
decode_url( $string )
Given a url-encoded string, this returns the decoded string using
"decode" in APR::Request
{ "error": { "code": 401, "message": "Something went wrong" } }
Otherwise, it will send to the client the message as is.
## compression\_threshold( $integer )
The number of bytes threshold beyond which, the ["reply"](#reply) method will gzip compress the data returned to the client.
## decode\_base64( $data )
Given some data, this will decode it using base64 algorithm. It uses ["decode" in APR::Base64](https://metacpan.org/pod/APR%3A%3ABase64#decode) in the background.
## decode\_json( $data )
This decode from utf8 some data into a perl structure using [JSON](https://metacpan.org/pod/JSON)
If an error occurs, it will return undef and set an exception that can be accessed with the [error](https://metacpan.org/pod/Module%3A%3AGeneric#error) method.
## decode\_url( $string )
Given a url-encoded string, this returns the decoded string using ["decode" in APR::Request](https://metacpan.org/pod/APR%3A%3ARequest#decode)
lib/Apache2/API.pm view on Meta::CPAN
{ "error": { "code": 401, "message": "Something went wrong" } }
Otherwise, it will send to the client the message as is.
=head2 compression_threshold( $integer )
The number of bytes threshold beyond which, the L</reply> method will gzip compress the data returned to the client.
=head2 decode_base64( $data )
Given some data, this will decode it using base64 algorithm. It uses L<APR::Base64/decode> in the background.
=head2 decode_json( $data )
This decode from utf8 some data into a perl structure using L<JSON>
If an error occurs, it will return undef and set an exception that can be accessed with the L<error|Module::Generic/error> method.
=head2 decode_url( $string )
Given a url-encoded string, this returns the decoded string using L<APR::Request/decode>
lib/Apache2/API/DateTime.pm view on Meta::CPAN
Provided with a date string, and this will parse it and return a L<DateTime> object, or sets an L<error|Module::Generic/error> and return C<undef> or an empty list depending on the context.
=head2 str2datetime
Given a string that looks like a date, this will parse it and return a L<DateTime> object.
=head2 str2time
Given a string that looks like a date, this returns its representation as a unix timestamp in second since epoch.
In the background, it calls L</str2datetime> for parsing.
=head2 time2datetime
Given a unix timestamp in seconds since epoch, this returns a L<DateTime> object.
=head2 time2str
Given a unix timestamp in seconds since epoch, this returns a string representation of the timestamp suitable for HTTP headers and cookies. The format is like C<Sat, 14 Dec 2019 22:12:30 GMT>
=head1 AUTHOR
( run in 2.353 seconds using v1.01-cache-2.11-cpan-0d23b851a93 )