[ARVADOS] updated: acef63e2e3e629da8b6825f33e6de7bf6bcc4fc2
git at public.curoverse.com
git at public.curoverse.com
Tue May 13 14:37:23 EDT 2014
Summary of changes:
sdk/perl/lib/Arvados.pm | 2 +-
sdk/perl/lib/Arvados/Request.pm | 9 +++++++--
2 files changed, 8 insertions(+), 3 deletions(-)
via acef63e2e3e629da8b6825f33e6de7bf6bcc4fc2 (commit)
from f54395a1b98c4146a795ce7b18e04c23630ab631 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit acef63e2e3e629da8b6825f33e6de7bf6bcc4fc2
Author: Tom Clegg <tom at curoverse.com>
Date: Tue May 13 14:36:50 2014 -0400
2673: Use _method=GET hack to avoid combining request body with GET
method (but still support parameters too long to fit in a query
string).
diff --git a/sdk/perl/lib/Arvados.pm b/sdk/perl/lib/Arvados.pm
index 31258f5..d5eca90 100644
--- a/sdk/perl/lib/Arvados.pm
+++ b/sdk/perl/lib/Arvados.pm
@@ -41,7 +41,7 @@ environment variable, or C<arvados>
Protocol scheme. Default: C<ARVADOS_API_PROTOCOL_SCHEME> environment
variable, or C<https>
-=item apiToken
+=item authToken
Authorization token. Default: C<ARVADOS_API_TOKEN> environment variable
diff --git a/sdk/perl/lib/Arvados/Request.pm b/sdk/perl/lib/Arvados/Request.pm
index 0faed28..07ca763 100644
--- a/sdk/perl/lib/Arvados/Request.pm
+++ b/sdk/perl/lib/Arvados/Request.pm
@@ -32,11 +32,16 @@ sub process_request
{
my $self = shift;
my %req;
- $req{$self->{'method'}} = $self->{'uri'};
+ my %content;
+ my $method = $self->{'method'};
+ if ($method eq 'GET' || $method eq 'HEAD') {
+ $content{'_method'} = $method;
+ $method = 'POST';
+ }
+ $req{$method} = $self->{'uri'};
$self->{'req'} = new HTTP::Request (%req);
$self->{'req'}->header('Authorization' => ('OAuth2 ' . $self->{'authToken'})) if $self->{'authToken'};
$self->{'req'}->header('Accept' => 'application/json');
- my %content;
my ($p, $v);
while (($p, $v) = each %{$self->{'queryParams'}}) {
$content{$p} = (ref($v) eq "") ? $v : JSON::encode_json($v);
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list