Okay, let me try this again. I have read the documentation for
LWP::UserAgent, HTTP::Request, and HTTP::Response. None of these
explicitly state that HTTP delete can be used. My server logs nothing.
It is as if the URL was never even hit.
My Code:
sub _deviceDELETEbyIP
{
($self, $host, $user, $pswd, $port, $protocol, $deviceDELETEIP)=@_;
my $FormLogin = FormLogin->new();
#This method returns an LWP::UserAgent object
$browser=$FormLogin->doLogin($host, $user, $pswd, $port, $protocol);
#This is a URL to hit a web service on my server
my $URL = "$protocol\://$host:$port/sdk/device?ip=$deviceDELETEIP";
my $request = HTTP::Request->new('DELETE', $URL);
# Prints DELETE
https://SERVER:443/sdk/device?ip=10.100.1.20
print $request->as_string();
# I get an error- Can't call method "request" on an undefined value
my $response=$browser->request($request);
}
END
I have written several methods that perform other http methods. I just
can't get the DELETE method to work. I'm wondering if it is even a
valid option? Any help would be greatly appreciated.
Thanks,
Mandy