From 77dd17d110b75bfcbd7332e5446d71be397fa474 Mon Sep 17 00:00:00 2001 From: Elvin Aslanov Date: Sun, 24 Mar 2024 23:45:24 +0100 Subject: [PATCH] `REST.pm`: Swap `POST` and `PUT` `POST` creates, `PUT` updates with HTTP In the examples `PUT` is (rightfully) used for editing: https://github.com/gnustavo/JIRA-REST/blob/5de3eb67533868dbe821795a0bde2268b2cee0cf/examples/edit_issue.pl#L50 --- lib/JIRA/REST.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/JIRA/REST.pm b/lib/JIRA/REST.pm index 2a0e93a..33d71c3 100644 --- a/lib/JIRA/REST.pm +++ b/lib/JIRA/REST.pm @@ -719,11 +719,11 @@ Returns the RESOURCE as a Perl data structure. Deletes the RESOURCE. -=head2 PUT RESOURCE, QUERY, VALUE [, HEADERS] +=head2 POST RESOURCE, QUERY, VALUE [, HEADERS] Creates RESOURCE based on VALUE. -=head2 POST RESOURCE, QUERY, VALUE [, HEADERS] +=head2 PUT RESOURCE, QUERY, VALUE [, HEADERS] Updates RESOURCE based on VALUE.