Skip to content

Instantly share code, notes, and snippets.

@jgoulah
Created August 2, 2010 01:10
Show Gist options
  • Select an option

  • Save jgoulah/503972 to your computer and use it in GitHub Desktop.

Select an option

Save jgoulah/503972 to your computer and use it in GitHub Desktop.
Index: lib/Net/OAuth/Simple.pm
===================================================================
--- lib/Net/OAuth/Simple.pm (revision 5569)
+++ lib/Net/OAuth/Simple.pm (working copy)
@@ -712,6 +712,13 @@
my $req;
if ($method eq 'post') {
$req = HTTP::Request::Common::POST($uri, Content => $params);
+ } elsif ($method eq 'put') {
+ $req = HTTP::Request::Common::POST $uri, Content => $params;
+ $req->method('PUT');
+ } elsif ($method eq 'delete') {
+ my $request_url = URI->new($url);
+ $request_url->query_form(%$params);
+ $req = HTTP::Request::Common::DELETE($request_url);
} else {
my $request_url = URI->new($url);
$request_url->query_form(%$params);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment