Hi all,
the following script should send an http-request to httpbin.org. But it fails with the creation of the proper request string, probably since the script interprets it as a sequence of namespaces separated in the old style using apostrophe. What am I doing wrong?
#!/usr/bin/perl use strict; use REST::Client; my $client = REST::Client->new(); my $request=q{DELETE('https://www.httpbin.org/delete')}; print $request; eval( $client->$request ); print $client->responseCode();
Execution leads to the following
Can't locate object method ")" via package "DELETE('https://www.httpbin.org/delete" (perhaps you forgot to load "DELETE('https://www.httpbin.org/delete"?) at test.pl line 7.In reply to Problem creating http request string using apostrophe by Bloehdian
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |