file in the parent directory.
=head1 DEVELOPMENT NOTES
=head2 UTF-8
In conformance with the JSON standard, all data passing to and from the
server are assumed to be encoded in UTF-8. Users who n
e_utf8 );
use File::Temp qw( tempfile );
use HTTP::Request::Common qw( GET PUT POST DELETE );
use JSON;
use LWP::UserAgent;
use Params::Validate qw(:all);
use Try::Tiny;
# methods/attributes not defi
, and generates
a "415 Unsupported Media Type" response if it is anything other than
'application/json'.
=cut
sub known_content_type {
my ( $self, $content_type ) = @_;
#$log->debug( "known
e object
if ( ref( $content_type ) eq '' ) {
return ( $content_type =~ m/application\/json/ ) ? 1 : 0;
}
if ( ref( $content_type ) eq 'HTTP::Headers::ActionPack::MediaType' ) {
ch;
use strict;
use warnings;
use App::CELL qw( $CELL $log $meta $site );
use Data::Dumper;
use JSON;
use Params::Validate qw(:all);
# methods/attributes not defined in this module will be inherite
DALONE_MODE;
$log->debug( "Employee $nick login attempt" );
my ( $code, $message, $body_json );
if ( $standalone ) {
# check nam and pwd against MFILE_WWW_STANDALONE_CREDENTIALS_
{
$code = 200;
$message = 'OK';
$body_json = { payload =>
{
emp => { nick => $nick, ei