Thread Request mit POST (multipart/form-data) (4 answers)
Opened by MarkusH at 2021-03-14 18:46

GwenDragon
 2021-03-14 19:12
#193171 #193171
User since
2005-01-17
14746 Artikel
Admin1
[Homepage]
user image
Quote
The optional $content argument should be a string of bytes.

https://metacpan.org/pod/HTTP::Request#$r-=-HTTP::...


Aber POST geht doch auch einfacher.

Beispiel:
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use HTTP::Request::Common;

my $login = {
USERNAME => 'asdf',
PASSWORD => 'ääää',
};
my $r = HTTP::Request::Common::POST(
'http://127.0.0.1:12555',
Content_Type => 'multipart/form-data; boundary=----schnippschnapp',
Content => [
username => $login->{USERNAME},
password => $login->{PASSWORD},
]

);

Last edited: 2021-03-14 20:18:39 +0100 (CET)

View full thread Request mit POST (multipart/form-data)