view release on metacpan or search on metacpan
software and to any other program whose authors commit to using it.
You can use it for your programs, too.
When we speak of free software, we are referring to freedom, not
price. Specifically, the General Public License is designed to make
sure that you have the freedom to give away or sell copies of free
software, that you receive source code or can get it if you want it,
that you can change the software or use pieces of it in new free
programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of a such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must tell them their rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any program or other work which
contains a notice placed by the copyright holder saying it may be
distributed under the terms of this General Public License. The
"Program", below, refers to any such program or work, and a "work based
on the Program" means either the Program or any work containing the
Program or a portion of it, either verbatim or with modifications. Each
licensee is addressed as "you".
1. You may copy and distribute verbatim copies of the Program's source
code as you receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice and
disclaimer of warranty; keep intact all the notices that refer to this
General Public License and to the absence of any warranty; and give any
other recipients of the Program a copy of this General Public License
along with the Program. You may charge a fee for the physical act of
transferring a copy.
exchange for a fee.
Mere aggregation of another independent work with the Program (or its
derivative) on a volume of a storage or distribution medium does not bring
the other work under the scope of these terms.
3. You may copy and distribute the Program (or a portion or derivative of
it, under Paragraph 2) in object code or executable form under the terms of
Paragraphs 1 and 2 above provided that you also do one of the following:
a) accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of
Paragraphs 1 and 2 above; or,
b) accompany it with a written offer, valid for at least three
years, to give any third party free (except for a nominal charge
for the cost of distribution) a complete machine-readable copy of the
corresponding source code, to be distributed under the terms of
Paragraphs 1 and 2 above; or,
c) accompany it with the information you received as to where the
corresponding source code may be obtained. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form alone.)
Source code for a work means the preferred form of the work for making
modifications to it. For an executable file, complete source code means
all the source code for all modules it contains; but, as a special
exception, it need not include source code for modules which are standard
libraries that accompany the operating system on which the executable
file runs, or for standard header files or definitions files that
accompany that operating system.
4. You may not copy, modify, sublicense, distribute or transfer the
Program except as expressly provided under this General Public License.
Any attempt otherwise to copy, modify, sublicense, distribute or transfer
the Program is void, and will automatically terminate your rights to use
the Program under this License. However, parties who have received
copies, or rights to use copies, from you under this General Public
License will not have their licenses terminated so long as such parties
remain in full compliance.
5. By copying, distributing or modifying the Program (or any work based
on the Program) you indicate your acceptance of this license to do so,
and all its terms and conditions.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the original
licensor to copy, distribute or modify the Program subject to these
terms and conditions. You may not impose any further restrictions on the
recipients' exercise of the rights granted herein.
7. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of the license which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
the license, you may choose any version ever published by the Free Software
Foundation.
8. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
The hypothetical commands `show w' and `show c' should show the
appropriate parts of the General Public License. Of course, the
commands you use may be called something other than `show w' and `show
c'; they could even be mouse-clicks or menu items--whatever suits your
program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
program `Gnomovision' (a program to direct compilers to make passes
at assemblers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
That's all there is to it!
--- The Artistic License 1.0 ---
This software is Copyright (c) 2021 by Mathieu Jondet.
This is free software, licensed under:
- "Reasonable copying fee" is whatever you can justify on the basis of media
cost, duplication charges, time of people involved, and so on. (You will
not be required to justify it to the Copyright Holder, but only to the
computing community at large as a market that must bear the fee.)
- "Freely Available" means that no fee is charged for the item itself, though
there may be fees involved in handling the item. It also means that
recipients of the item may redistribute it under the same conditions they
received it.
1. You may make and give away verbatim copies of the source form of the
Standard Version of this Package without restriction, provided that you
duplicate all of the original copyright notices and associated disclaimers.
2. You may apply bug fixes, portability fixes and other modifications derived
from the Public Domain or from the Copyright Holder. A Package modified in such
a way shall still be considered the Standard Version.
3. You may otherwise modify your copy of this Package in any way, provided that
you insert a prominent notice in each changed file stating how and when you
changed that file, and provided that you do at least ONE of the following:
4. You may distribute the programs of this Package in object code or executable
form, provided that you do at least ONE of the following:
a) distribute a Standard Version of the executables and library files,
together with instructions (in the manual page or equivalent) on where to
get the Standard Version.
b) accompany the distribution with the machine-readable source of the Package
with your modifications.
c) accompany any non-standard executables with their corresponding Standard
Version executables, giving the non-standard executables non-standard
names, and clearly documenting the differences in manual pages (or
equivalent), together with instructions on where to get the Standard
Version.
d) make other distribution arrangements with the Copyright Holder.
5. You may charge a reasonable copying fee for any distribution of this
Package. You may charge any fee you choose for support of this Package. You
may not charge a fee for this Package itself. However, you may distribute this
examples/edw/Rest.pl view on Meta::CPAN
my %h_setup = (
grid => $grid,
ip => $ip,
token => $token,
site => $site,
query => $query
);
# get local IP
if ( !defined $h_setup{ip} || !length $h_setup{ip} ) {
my $response = HTTP::Tiny->new->get('http://monip.org/');
unless ( $response->{success} ) {
print STDERR "\tunable to reach external network to get IP address.\n";
exit(1);
}
($h_setup{ip}) = ($response->{content} =~ /IP\s:\s(\d+\.\d+\.\d+\.\d+)/gm);
}
foreach my $p ( qw/ grid ip token site query / ) {
if ( !defined $h_setup{$p} || !length $h_setup{$p} ) {
print STDERR "\tmissing $p parameter, check help.\n";
exit(1);
}
}
delete $h_setup{$_} for ( qw/ site query / );
examples/edw/get_csv_file.pl view on Meta::CPAN
my %h_setup = (
grid => $grid,
ip => $ip,
token => $token,
site => $site,
query => $query
);
# get local IP
if ( !defined $h_setup{ip} || !length $h_setup{ip} ) {
my $response = HTTP::Tiny->new->get('http://monip.org/');
unless ( $response->{success} ) {
print STDERR "\tunable to reach external network to get IP address.\n";
exit(1);
}
($h_setup{ip}) = ($response->{content} =~ /IP\s:\s(\d+\.\d+\.\d+\.\d+)/gm);
}
foreach my $p ( qw/ grid ip token site query / ) {
if ( !defined $h_setup{$p} || !length $h_setup{$p} ) {
print STDERR "\tmissing $p parameter, check help.\n";
exit(1);
}
}
delete $h_setup{$_} for ( qw/ site query / );
lib/API/Eulerian/EDW/Authority.pm view on Meta::CPAN
# @param $platform - API::Eulerian::EDW Authority Platform.
# @param $grid - API::Eulerian::EDW Data Warehouse Grid.
# @param $ip - Peer IP.
# @param $token - API::Eulerian::EDW Token.
#
# @return API::Eulerian::EDW::Status
#
sub bearer
{
my ( $class, $kind, $platform, $grid, $ip, $token ) = @_;
my $response;
my $status;
my $code;
my $json;
# Get URL used to request API::Eulerian::EDW Authority for Token.
$status = $class->_url( $kind, $platform, $grid, $ip, $token );
# Handle errors
if( ! $status->error() ) {
# Request API::Eulerian::EDW Authority
$status = API::Eulerian::EDW::Request->get( $status->{ url } );
# Get HTTP response
$response = $status->{ response };
# Get HTTP response code
$code = $response->code;
# We expect JSON reply data
$json = API::Eulerian::EDW::Request->json( $response );
if( $json && ( $code == 200 ) ) {
$status = $json->{ error } ?
$class->_error( $code, $json->{ error_msg } ) :
$class->_success( $kind, $json );
} else {
$status = $class->_error(
$code, $json ?
encode_json( $json ) :
$response->decoded_content
);
}
}
return $status;
}
#
# @brief Get API::Eulerian::EDW Authority URL used to retrieve Session/Access Token
# to API::Eulerian::EDW Data Warehouse Platform.
#
lib/API/Eulerian/EDW/Hook.pm view on Meta::CPAN
#
sub on_replace
{
my ( $self, $uuid, $rows ) = @_;
}
#
# @brief
#
# @param $self - Eulerian Data Warehouse Peer Hook.
# @param $uuid - UUID of Eulerian Analytics Analysis.
# @param $progress - Progression value.
#
sub on_progress
{
my ( $self, $uuid, $progress ) = @_;
}
#
# @brief
#
# @param $self - Eulerian Data Warehouse Peer Hook.
# @param $uuid - UUID of Eulerian Analytics Analysis.
# @param $token - AES Token or Bearer.
# @param $errnum - Error number.
# @param $err - Error description.
# @param $updated - Count of updates on server.
lib/API/Eulerian/EDW/Hook.pm view on Meta::CPAN
=head3 input
=over 4
=item * uuid - Eulerian Data Warehouse Analysis identifier.
=item * rows - Array of Array of columns values.
=back
=head2 on_progress()
I<Interface definition of the callback function used to control the progression
of an Eulerian Data Warehouse Analysis.>
=head3 input
=over 4
=item * uuid - Eulerian Data Warehouse Analysis identifier.
=item * progress - Progression value.
=back
=head2 on_status()
I<Interface definition of the callback function called at the end of an Eulerian
Data Warehouse Analysis.>
=head3 input
lib/API/Eulerian/EDW/Hook/Noop.pm view on Meta::CPAN
# @param $uuid - UUID of Eulerian Analytics Analysis.
# @param $rows - Array of Array of Columns values.
#
sub on_replace
{
my ( $self, $uuid, $rows ) = @_;
return $self;
}
#
# @brief Analysis progression callback.
#
# @param $self - Eulerian Data Warehouse Peer Hook.
# @param $uuid - UUID of Eulerian Analytics Analysis.
# @param $progress - Progression value.
#
sub on_progress
{
my ( $self, $uuid, $progress ) = @_;
return $self;
}
#
# @brief End of Eulerian Data Warehouse Analysis.
#
# @param $self - Eulerian Data Warehouse Peer Hook.
# @param $uuid - UUID of Eulerian Analytics Analysis.
# @param $token - AES Token or Bearer.
# @param $errnum - Error number.
# @param $err - Error description.
lib/API/Eulerian/EDW/Hook/Print.pm view on Meta::CPAN
for my $row ( @$rows ) {
for my $col ( @$row ) {
$string .= defined( $col ) ? "$col | " : "NULL | ";
}
$string .= "\n";
}
print( $string );
}
#
# @brief Analysis progression callback.
#
# @param $self - Eulerian Data Warehouse Peer Hook.
# @param $uuid - UUID of Eulerian Analytics Analysis.
# @param $progress - Progression value.
#
sub on_progress
{
my ( $self, $uuid, $progress ) = @_;
print( "PROGRESSION : $progress\n" );
return $self;
}
#
# @brief End of Eulerian Data Warehouse Analysis.
#
# @param $self - Eulerian Data Warehouse Peer Hook.
# @param $uuid - UUID of Eulerian Analytics Analysis.
# @param $token - AES Token or Bearer.
# @param $errnum - Error number.
# @param $err - Error description.
lib/API/Eulerian/EDW/Peer/Rest.pm view on Meta::CPAN
# @brief Create a new JOB on Eulerian Data Warehouse Rest Platform.
#
# @param $self - Eulerian Data Warehouse Peer.
# @param $command - Eulerian Data Warehouse Command.
#
# @return Reply content.
#
sub create
{
my ( $self, $command ) = @_;
my $response;
my $status;
# Create headers
$status = $self->headers();
if( ! $status->error() ) {
my $url = $self->url() . '/edw/jobs';
# Post Job create request to remote host
$status = API::Eulerian::EDW::Request->post(
$url, $status->{ headers }, $self->body( $command )
);
if( ! $status->error() ) {
$self->uuid(
API::Eulerian::EDW::Request->json(
$status->{ response }
)->{ data }->[ 0 ]
);
}
}
return $status;
}
#
# @brief Get Eulerian Data Warehouse Job Status.
#
# @param $self - Eulerian Data Warehouse Rest Peer.
# @param $reply - Eulerian Data Warehouse Platform Reply.
#
# @return Job Reply status.
#
sub status
{
my ( $self, $status ) = @_;
my $response = $status->{ response };
my $url = API::Eulerian::EDW::Request->json(
$response )->{ data }->[ 1 ];
$status = $self->headers();
if( ! $status->error() ) {
$status = API::Eulerian::EDW::Request->get(
$url, $status->{ headers }
);
}
return $status;
}
lib/API/Eulerian/EDW/Peer/Rest.pm view on Meta::CPAN
# @param $self - API::Eulerian::EDW::Rest instance.
# @param $rc - Return context.
#
# @return 0 - Not running.
# @return 1 - Running.
#
sub running
{
my ( $self, $status ) = @_;
return API::Eulerian::EDW::Request->json(
$status->{ response }
)->{ status } eq 'Running';
}
#
# @brief Test if Job status is 'Done'.
#
# @param $self - API::Eulerian::EDW::Rest instance.
# @param $rc - Return context.
#
# @return 0 - Not Done.
# @return 1 - Done.
#
sub done
{
my ( $self, $status ) = @_;
return ! $status->{ error } ?
API::Eulerian::EDW::Request->json(
$status->{ response }
)->{ status } eq 'Done' :
0;
}
#
# @brief Get Path to local filepath.
#
# @param $self - API::Eulerian::EDW::Rest instance.
#
# @return Local file path.
#
sub path
{
my ( $self, $response ) = @_;
my $encoding = $self->encoding();
my $json = API::Eulerian::EDW::Request->json( $response );
my $pattern = '([0-9]*)\.(json|csv|parquet)';
my $status = API::Eulerian::EDW::Status->new();
my $url = $json->{ data }->[ 1 ];
my $wdir = $self->wdir();
my %rc = ();
if( ! $wdir ) {
$status->error( 1 );
$status->code( 400 );
$status->msg( "Working directory isn't set" );
lib/API/Eulerian/EDW/Peer/Rest.pm view on Meta::CPAN
my( $self, $zipped ) = @_;
my $unzipped;
# Parse zipped file
$zipped =~ /(.*)\.gz/;
# Unzipped file name
$unzipped = $1;
# Gunzip zipped file into unzipped file
IO::Uncompress::Gunzip::gunzip(
$zipped, $unzipped, BinModeOut => 1
);
# Remove zipped file
unlink $zipped;
# Return path to unzipped file
return $unzipped;
}
#
lib/API/Eulerian/EDW/Peer/Rest.pm view on Meta::CPAN
# @param $self - Eulerian Data Warehouse Rest Peer.
# @param $rc - Reply context.
#
# @return Reply context
#
sub download
{
my ( $self, $status ) = @_;
# From Last status message compute local file path
$status = $self->path( $status->{ response } );
# If no error
if( ! $status->{ error } ) {
my $path = $status->{ path };
my $url = $status->{ url };
my $response;
# Get HTTP request headers
$status = $self->headers();
if( ! $status->{ error } ) {
# Send Download request to remote host, reply is
# writen into $path file
$status = API::Eulerian::EDW::Request->get(
$url, $status->{ headers }, $path
);
lib/API/Eulerian/EDW/Peer/Rest.pm view on Meta::CPAN
# @brief Do Request on Eulerian Data Warehouse Platform.
#
# @param $self - Eulerian Data Warehouse Peer.
# @param $command - Eulerian Data Warehouse Command.
#
use Data::Dumper;
sub request
{
my ( $self, $command ) = @_;
my $bench = new API::Eulerian::EDW::Bench();
my $response;
my $status;
my $json;
# Create Job on Eulerian Data Warehouse Platform
$bench->start();
$status = $self->create( $command );
$bench->stage( 'create' );
# Wait end of Job
$bench->start();
lib/API/Eulerian/EDW/Peer/Thin.pm view on Meta::CPAN
#
# @param $self - Eulerian Data Warehouse Peer.
# @param $command - Eulerian Data Warehouse Command.
#
# @return Reply context.
#
use Data::Dumper;
sub create
{
my ( $self, $command ) = @_;
my $response;
my $status;
# Get Valid Headers
$status = $self->headers();
if( ! $status->error() ) {
# Post new JOB to Eulerian Data Warehouse Platform
$status = API::Eulerian::EDW::Request->post(
$self->url(), $status->{ headers }, $command, 'text/plain'
);
if( ! $status->error() ) {
my $json = API::Eulerian::EDW::Request->json( $status->{ response } );
if( defined( $json ) && $json->{ status }->[ 1 ] != 0 ) {
$status = API::Eulerian::EDW::Status->new();
$status->error( 1 );
$status->msg( $json->{ status }->[ 0 ] );
$status->code( $json->{ status }->[ 1 ] );
}
}
}
return $status;
}
#
# @brief Dispatch Eulerian Data Warehouse Analytics Analysis result messages to
# their matching callback hook.
#
# @param $ws - Eulerian WebSocket.
# @param $buf - Received buffer.
#
sub dispatcher
{
my ( $ws, $buf ) = @_;
$buf = encode( 'utf-8', $buf );
my $json = decode_json( $buf );
lib/API/Eulerian/EDW/Peer/Thin.pm view on Meta::CPAN
$hook->on_replace( $json->{ uuid }, $json->{ rows } );
}
case 'headers' {
#print Dumper( $json ) . "\n";
$self->{ uuid } = $uuid;
$hook->on_headers(
$json->{ uuid }, $json->{ timerange }->[ 0 ],
$json->{ timerange }->[ 1 ], $json->{ columns }
);
}
case 'progress' {
$hook->on_progress(
$json->{ uuid }, $json->{ progress }
);
}
case 'status' {
$hook->on_status(
$json->{ uuid }, $json->{ aes }, $json->{ status }->[ 1 ],
$json->{ status }->[ 0 ], $json->{ status }->[ 2 ]
);
}
else {}
}
lib/API/Eulerian/EDW/Peer/Thin.pm view on Meta::CPAN
# messages types.
#
# @param $self - API::Eulerian::EDW::Peer:Thin instance.
# @param $rc - Reply context of JOB creation.
#
# @return Reply context.
#
sub join
{
my ( $self, $status ) = @_;
my $json = API::Eulerian::EDW::Request->json( $status->{ response } );
my $ws = API::Eulerian::EDW::WebSocket->new(
$self->host(), $self->ports()->[ $self->secure() ]
);
my $url = $self->url( $json->{ aes } );
$ws->{ _THIN } = $self;
return $ws->join( $url, \&dispatcher );
}
#
# @brief Do Request on Eulerian Data Warehouse Platform.
#
# @param $self - Eulerian Data Warehouse Peer.
# @param $command - Eulerian Data Warehouse Command.
#
sub request
{
my ( $self, $command ) = @_;
my $bench = new API::Eulerian::EDW::Bench();
my $response;
my $status;
my $json;
# Create Job on Eulerian Data Warehouse Platform
$bench->start();
$status = $self->create( $command );
$bench->stage( 'create' );
if( ! $status->error() ) {
# Join Websocket call user specific callback hook
lib/API/Eulerian/EDW/Request.pm view on Meta::CPAN
#
# @param $class - API::Eulerian::EDW::HTTP class.
#
# @return HTTP Headers.
#
sub headers
{
return HTTP::Headers->new();
}
#
# @brief Test if the content type of given HTTP response is a
# JSON format.
#
# @param $class - API::Eulerian::EDW::Request Class.
# @param $response - HTTP response.
#
# @return 1 - Content type is JSON.
# @return 0 - Content type isnt JSON.
#
sub is_json
{
my ( $class, $response ) = @_;
my $type;
# Get content type value from HTTP response
$type = $response->header( 'content-type' );
if( defined( $type ) ) {
# Split content type into an array.
my @subtypes = split( '; ', $type );
# Iterate on subtypes entries
foreach my $subtype ( @subtypes ) {
# Test if subtype is JSON format
if( $subtype eq 'application/json' ) {
return 1;
}
}
}
return 0;
}
#
# @brief Get JSON object from HTTP response.
#
# @param $class - API::Eulerian::EDW::Request class.
# @param $response - HTTP response.
#
# @return JSON object.
#
sub json
{
my ( $class, $response ) = @_;
my $data = undef;
if( $class->is_json( $response ) ) {
$data = $response->decoded_content;
if( defined( $data ) ) {
chomp( $data );
if( length( $data ) > 0 ) {
$data = encode( 'utf-8', $data );
$data = decode_json( $data );
} else {
$data = undef;
}
}
}
lib/API/Eulerian/EDW/Request.pm view on Meta::CPAN
SSL_verifycn_publicsuffix => '',
SSL_verify_mode => IO::Socket::SSL::SSL_VERIFY_NONE,
verify_hostname => 0,
SSL_hostname => '',
},
);
# Increase Read Timeout on TCP socket to avoid being disconnected
$endpoint->timeout( 1800 );
# Send Request, wait response if file is defined reply content is
# writen into local file.
my $response = $endpoint->request( $request, $file );
my $json = API::Eulerian::EDW::Request->json( $response );
$status->{ response } = $response;
if( $response->code != HTTP_OK ) {
$status->error( 1 );
$status->code( $response->code );
$status->msg(
defined( $json ) ?
encode_json( $json ) : $response->content()
);
} else {
if( defined( $response->header( 'content-encoding' ) ) ) {
$status->{ encoding } = $response->header( 'content-encoding' );
}
}
return $status;
}
#
# End up module properly
#
1;
lib/API/Eulerian/EDW/Request.pm view on Meta::CPAN
=item * headers : HTTP headers.
=item * file : [optional] Local file path used to store HTTP reply.
=back
=head3 output
=over 4
=item * API::Eulerian::EDW::Status. On success a new entry named 'response' is inserted into the status.
=back
=head2 post()
I<Send HTTP POST request on given url>
=head3 input
=over 4
lib/API/Eulerian/EDW/Request.pm view on Meta::CPAN
=item * what : Content of POST request.
=item * type : Content type of POST request.
=back
=head3 output
=over 4
=item * API::Eulerian::EDW::Status. On success a new entry named 'response' is inserted into the status.
=back
=head2 headers()
I<Create a new HTTP::Headers instance>
=head3 output
=over 4
=item * Instance of an HTTP::Headers.
=back
=head2 is_json()
I<Test if given HTTP response content is a JSON format>
=head3 input
=over 4
=item * HTTP response.
=back
=head3 output
=over 4
=item * 1 - HTTP response content is in JSON format.
=item * 0 - HTTP response content isnt in JSON format.
=back
=head2 json()
I<Get JSON message from HTTP response>
=head3 input
=over 4
=item * HTTP response.
=back
=head3 output
=over 4
=item * JSON message.
=back