[Koha-bugs] [Bug 24502] Add a query language and param (q=) to the API

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Feb 5 17:19:35 CET 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24502

--- Comment #13 from Agustín Moyano <agustinmoyano at theke.io> ---
Hi Martin, I tryed to use this version of q parameter to be sent into the body
of a GET request, but unfortunately browsers don't allow that kind of messages.

I stripped the code to de bare bones of JS creating a XMLHTTPRequest and it's
replacement, the "Fetch API", but nither of both sends body content with a GET
request. The first one ignores the content if the method is GET, and the second
one throws an exception.

I would suggest to keep q parameter in body, but also to have a q parameter in
the query, and maybe also in a header (something like 'x-koha-query')

So if you are using any server side program to fetch from de API, you can send
body content in the GET request, but if you are using the browser you can
choose to use q parameter in the query, or if you want to keep it clean, use
the x-koha-query header.

Regards

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list