Pergunta

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.

Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top