Thread HTTP::Request::Common verallgemeinern
(5 answers)
Opened by Andi123 at 2017-08-03 16:30
Verstehe das Problem nicht. Ich mache alle Requests mit 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 HTTP::Request benutzen. 10 print "Hallo"
20 goto 10 |