Domanda

In Perl WWW:Mechanize would a

$mech->get($url) 

and a

$mech->post($url, [ 'field' => "$var"]);

command run on the same or separate instances of a page?

I'm looking up values of form/field IDs and using them to generate the POST command, but it's working.

È stato utile?

Soluzione

HTTP is a stateless protocol. Every request is independent of any other, so there are no "instances" of a page.

It is possible to create sessions by tying requests together using cookies, but from what you've told us that is irrelevant here.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top