morgon has asked for the wisdom of the Perl Monks concerning the following question:
I am try to configure a modem that has a http-api.
When I capture what the browser-based GUI does I can see that it sends http-headers that look like this:
This is what I try to replicate in a perl-script.__RequestVerificationToken: acP92nszWSeNIAeL/Al9Rj24scVQXt+o
What I do is this:
But when I capture what the script sends I find that the leading underscores seem to get replaced with minuses, i.e.my $mech = WWW::Mechanize->new; my $r = HTTP::Request->new("POST", $some_url); $r->header("__RequestVerificationToken" => $key); # set content and some other headers here $mech->request($r);
So my question is: Why is that and how can I turn it off so I can send headers with leading double-underscores?--RequestVerificationToken: whatever
Many thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: double underscore in http-header
by kcott (Archbishop) on Jan 12, 2017 at 20:53 UTC | |
by morgon (Priest) on Jan 12, 2017 at 21:19 UTC | |
by kcott (Archbishop) on Jan 12, 2017 at 22:06 UTC | |
by kennethk (Abbot) on Jan 12, 2017 at 21:25 UTC | |
|
Re: double underscore in http-header
by kennethk (Abbot) on Jan 12, 2017 at 19:43 UTC | |
by morgon (Priest) on Jan 12, 2017 at 19:54 UTC | |
by kennethk (Abbot) on Jan 12, 2017 at 20:08 UTC |