Thread HTTP::Request::Common verallgemeinern (5 answers)
Opened by Andi123 at 2017-08-03 16:30

bianca
 2017-08-04 07:36
#187089 #187089
User since
2009-09-13
6977 Artikel
BenutzerIn

user image
Verstehe das Problem nicht. Ich mache alle Requests mit CPAN:HTTP::Request::Common — das sind inzwischen einige und ziemlich verschiedene Ziele im Intra- und Internet.

Beispiel für ein Reboot der FRITZ!Box:
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
require HTTP::Request::Common;
my $post_request = HTTP::Request::Common::POST(
    $url_geraet.'/data.lua',
    Content_Type    => 'application/x-www-form-urlencoded',
    Content         => [
        lang            => 'de',
        no_sidrenew     => '',
        oldpage         => '/system/reboot.lua',
        reboot          => '',
        sid             => $sid,
        xhr             => 1,
    ],
);
my $resp = $mech->request($post_request);

Zeig mal ein konkretes Beispiel wo du denkst, du musst zwingend CPAN:HTTP::Request benutzen.
10 print "Hallo"
20 goto 10

View full thread HTTP::Request::Common verallgemeinern