Code: Select all
my $query = $cgi->param('q');
my $query_decoded = uri_decode($query);
my $ua = LWP::UserAgent->new;
my $response = $ua->get("https://mysite.com/kb/api.php?action=search&lang=en&q=$query");
my $results = decode_json($response->content);
However, pasting
Code: Select all
https://mysite.com/kb/api.php?action=search&lang=en&q=searchterm
There's some configuration error, it seems, that's somehow getting the way.
Am I (still) supposed to be able to do this? I just want to get the raw search results so that I can format them.