AMF-Connection
view release on metacpan or search on metacpan
lib/AMF/Connection.pm view on Meta::CPAN
'encoding' => 0, # default is AMF0 encoding
'ua' => new LWP::UserAgent(),
'append_to_endpoint' => ''
};
$self->{'ua'}->cookie_jar( $self->{'http_cookie_jar'} );
return bless($self, $class);
};
# plus add paramters, referer, user agent, authentication/credentials ( see also SecureAMFChannel stuff ),
# plus timezone on retunred dates to pass to de-serializer - see AMF3 spec saying "it is suggested that time zone be queried independnetly as needed" - unelss local DateTime default to right locale!
# we pass the string, and let Storable::AMF to parse the options into a scalar - see Input/OutputStream and Storable::AMF0 documentation
sub setInputAMFOptions {
my ($class, $options) = @_;
$class->{'input_amf_options'} = $options;
};
lib/AMF/Connection.pm view on Meta::CPAN
sub callBatch {
my ($class, @batch) = @_;
my $request = new AMF::Connection::Message;
$request->setEncoding( $class->{'encoding'} );
# add AMF any request headers
map { $request->addHeader( $_ ); } @{ $class->{'headers'} };
# TODO - prepare HTTP/S request headers based on AMF headers received/set if any - and credentials
foreach my $call (@batch)
{
next
unless (defined $call && ref ($call) =~ m/HASH/
&& defined $call->{'operation'} && defined $call->{'arguments'});
my $operation = $call->{'operation'};
my $arguments = $call->{'arguments'};
( run in 0.975 second using v1.01-cache-2.11-cpan-a5abf4f5562 )