0=0&1=1&2=2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
use strict;
use warnings;
use LWP::UserAgent;
my $pw_ticketsystem='abcdefg';
my $us_ticketsystem='1234567';
my $url = "https://url/CallLog";
my $response;
my $ua = LWP::UserAgent->new;
$ua->requests_redirectable(undef); # Redirects ausschalten!
$ua->credentials("url-server:443", "realm", $us_ticketsystem, $pw_ticketsystem);
$ENV{HTTPS_PROXY} = 'proxyserver';
$ENV{HTTPS_PROXY_USERNAME} = 'username';
$ENV{HTTPS_PROXY_PASSWORD} = 'passsword';
my $response = $ua->post($url,
[
0=>0,
1=1,
2=2
]);
print $response->status_line;
1
2
3
4
5
...
my $transmitted_data = "0=0\n1=1\n2=2";
......
my $response = $ua->post($url, $transmitted_data);
....
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
use LWP::UserAgent; use HTTP::Request::Common qw/POST/; $ENV{HTTP_PROXY} = 'http://127.0.0.1:8888'; my $ua = LWP::UserAgent->new; $ua->env_proxy; $ua->request(POST 'http://example.org/url/', Content_Type => 'multipart/form-data', Content => [ '0=0', '1=1', '2=2' ] );
1 2 3 4
$ua->request(POST 'http://example.org/url/', Content_type => 'text/plain', Content => "0=0\n1=1\n2=2" );
1
2
3
4
5
6
7
$ua->request(POST 'http://example.org/url/',
Content_type => 'text/plain',
Content =>
"0=0
1=1
2=2"
);
\n
text/plain
"a\nb\nc\n"