Hi guys, I’m trying to implement OpenSearch support, but I’m struggling.
In the “Url” element, I’m required to send the query via a name-value pair — which would be easy enough to solve; either with a route or the .htaccess:
<Url type="application/json"
rel="suggestions"
template="http://example.com/suggest?q={searchTerms}" >However, the method only accepts the search query as a $_POST value. Additionally, the method refers to itself to generate pagination, which would muddle the URI segment space.
So, while I know that it’s possible to write a separate method to accept the in-bound query string, I’d need to know how I’d then make that method wrap the query up as $_POST data and then ping the search method with it.
Or, I’ve got the whole thing wrong and some genius here knows a better way.