API-Eulerian

 view release on metacpan or  search on metacpan

lib/API/Eulerian/EDW/Request.pm  view on Meta::CPAN

# @param $type - Data type of POST request
# @param $file - Local file path used to store HTTP reply.
#
# @return API::Eulerian::EDW::Status instance.
#
use Data::Dumper;
sub _request
{
  my ( $class, $method, $url, $headers, $what, $type, $file ) = @_;
  my $status = API::Eulerian::EDW::Status->new();
  my $endpoint;
  my $request;

  # Ensure default type
  $type = $type || 'application/json';

  # Sanity check POST arguments
  if( $method eq 'POST' ) {
    if( ! ( defined( $what ) && defined( $type ) ) ) {
      $status->error( 1 );
      $status->msg( "Mandatory argument to post request is/are missing" );

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.508 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )