Can I encode spaces as% 20 in POST from WWW :: Mechanize?

I use WWW :: Mechanize to do a standard website crawl, but at some point I need to create a special POST request and send it. All this requires session cookies.

In the POST request I'm doing, spaces are encoded in + characters, but I need them like% 20.

I cannot figure out how to change this behavior. I understand that they are equivalent, but for reasons that are out of my hands, this is what I should do.

Thanks for any help.

+3
source share
2 answers

URI:: _ query:: query_form(). +.

 $val =~ s/ /+/g;

URI:: _ query:: query , + . URI:: _ query:: query Hook:: LexWrap, , + %20 .

URI:: _ query::. , , .

.:)

, Perl. , , .

+1

URI:: _ query:: query_form(). , $URI:: DEFAULT_QUERY_FORM_DELIMITER, URI.

, , LWP:: UserAgent request_prepare?

0

Source: https://habr.com/ru/post/1717028/


All Articles