Net::HTTP 一次添加 cookie, body 发送post请求

use Net::HTTP::Request;
use Net::HTTP::URL;
use Net::HTTP::Transport; my $url = Net::HTTP::URL.new("http://localhost/sqli-labs-master/Less-1/?id=2%");
my $request = Net::HTTP::Request.new(:$url, :method<POST>, header => {:Host<google.com>,:cookie<abcde=>}, body => 'abcde');
say $request.WHAT;
say $request.Str;
say $request.^methods; my $transport = Net::HTTP::Transport.new;
my $response = $transport.round-trip($request);
say $response.body.decode('utf-8');
上一篇:js - 在拼接字符串中动态submit当前form


下一篇:hdu 1728 逃离迷宫 (BFS)