package Eixo::Rest;
use 5.008;
use strict;
use warnings;
use parent qw(Eixo::Base::Clase);
use JSON;
use LWP::UserAgent;
our $VERSION = '1.207';
1;
ute) = @_;
return undef if(grep {$attribute eq $_} $self->NOT_SERIALIZE);
return 1;
}
sub TO_JSON {
my $self = $_[0];
return {map {$_ => $self->$_} grep {$self->is_serializable($_)} keys(%$sel
> undef,
onSuccess => undef,
onError => undef,
onStart => undef,
__format=>'json',
buffer=>'',
);
sub start{
my ($self) = @_;
$self->{buffer} = ''; # truncate the
n/json
if($response->content_type eq 'application/json'){
use Encode;
$content = Encode::decode('UTF-8', $content);
}
if($self->__format eq 'json'){
return JSON->
;
use strict;
use Eixo::Base::Clase;
use URI;
use LWP::UserAgent;
use LWP::Protocol::https;
use JSON -convert_blessed_universally;
use Carp;
use Data::Dumper;
use Config;
use Eixo::Rest::RequestSyn
my $USER_AGENT_VERSION = 'EixoAgent/0.1';
has(
ua=>undef,
endpoint=>undef,
format=>'json',
error_callback => undef,
current_method => undef,
);
sub initialize{
my ($self, $e
tent-Type')
|| 'application/json';
#|| 'application/x-www-form-urlencoded';
if($content_type eq "application/json"){
$content = JSON->new->allow_blessed(1)
package Eixo::Rest::RequestAsync;
use strict;
use threads;
use Thread::Queue;
use JSON -convert_blessed_universally;
# use Eixo::Base::Clase;
use Eixo::Base::Clase 'Eixo::Rest::Request';
use Attr