sub call { my $self = shift; my ($method, $path, $format, $query, $content, $cb) = @_; $self->{Request} = HTTP::Request->new( $method, "https://$self->{host}/cgi-bin/api/" . join('/', @$path) . (".$format") . ($query ? "?$query" : "") ); $self->{Request}->content($content) if $content; $self->_head($self->{Request}, $cb); }