[Jifty-commit] r4834 - in Net-Jifty: .
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Sat Jan 12 23:00:31 EST 2008
Author: sartak
Date: Sat Jan 12 23:00:31 2008
New Revision: 4834
Modified:
Net-Jifty/ (props changed)
Net-Jifty/lib/Net/Jifty.pm
Log:
r50241 at onn: sartak | 2008-01-12 22:58:32 -0500
Don't special-case POST, factor URL creation into an outer score
Modified: Net-Jifty/lib/Net/Jifty.pm
==============================================================================
--- Net-Jifty/lib/Net/Jifty.pm (original)
+++ Net-Jifty/lib/Net/Jifty.pm Sat Jan 12 23:00:31 2008
@@ -289,27 +289,19 @@
# remove trailing /
$url =~ s{/+$}{};
+ my $uri = $self->site . '/=/' . $url . '.yml';
+
my $res;
if ($method eq 'get' || $method eq 'head') {
- my $uri = $self->site . '/=/' . $url . '.yml';
-
$uri .= '?' . $self->form_url_encoded_args(%args)
if keys %args;
$res = $self->ua->$method($uri);
}
- elsif ($method eq 'post') {
- $res = $self->ua->$method(
- $self->site . '/=/' . $url . '.yml',
- \%args
- );
- }
-
- # LWP::UserAgent provides direct methods only for get, head, and post
else {
my $req = HTTP::Request->new(
- uc($method) => $self->site . '/=/' . $url . '.yml'
+ uc($method) => $uri,
);
if (keys %args) {
More information about the Jifty-commit
mailing list