Hi Random Walk, try to separate urlpath from POST params in the POST() call.
The manpage says:
POST ( $url, [$body_content, %$headers] )
[] meaning optional
I suggest you do something like this and see how it goes (untested):
my $client = REST::Client->new(); $client->setHost($wiki); ... # got token # preparing a request: $request = "action=edit&title=LookupAutomationTest&summary=test%20summ +ary&text=article%20content"; $request .= '&format=json'; $request .= "&token=$token"; $client->POST($api, $request); # << separate path (e.g. "/mediawiki/ap +i.php") from the request-params e.g. the ? part which is now in strin +g $request.
'token' must be the last item in the params list according to the MediaWiki.
there is a pass in your code!
In reply to Re: Rest::Client Headers not getting through
by bliako
in thread Rest::Client Headers not getting through
by Random_Walk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |