Вопрос

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.

Это было полезно?

Решение

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top