I'm trying to convert my plugin that works under 7.8.1 to 7.9.2. I use the saved object REST API.
In order to get all index patterns already created.
The REST API call look like:
'http://localhost:5601/api/saved_objects/_find?type=index-pattern"
I use the http instance that is passed into the plugin template unchanged.
Somehow the REST API gets converted internally to:
'http://localhost:5601/api/saved_objects/_find%3Ftype=index-pattern"
What i now get is a 404 Not Found error.
I've tried using curl with both command options. Version with ? works as expected.
Version with %3F fails in the same manner.
Is there an option that can be passed to the http get command that will stop it from converting ? -> %3F?
Is this a known bug in the latest release?
function used to do the call is shown below.
async function getRequest(type) {
console.log('getRequest:' + type);
const url = webSite + '/api/saved_objects/_find?type=' + type;
console.log('getRequest final url:' + url);
const response = await httpClient.get(url);
console.log('http get response:' + JSON.stringify(response));
return response;
}