From f4c6bdada50e53b133af36163e3fe533f702b33f Mon Sep 17 00:00:00 2001 From: MAB Date: Wed, 18 Oct 2023 10:45:31 +0200 Subject: [PATCH] request() --- src/components/vs-input/vs-input.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/components/vs-input/vs-input.ts b/src/components/vs-input/vs-input.ts index af0351f..d709a50 100644 --- a/src/components/vs-input/vs-input.ts +++ b/src/components/vs-input/vs-input.ts @@ -153,17 +153,15 @@ export default class VsInput extends Vue { } private request(): void { - const openSearchUrl = 'https://your-search-engine.com/opensearch.xml'; + const searchUrl = 'https://tethysbackend/opensearch.xml'; //i would guess ? const searchTerms = this.display; - const openSearchQueryUrl = openSearchUrl.replace('{searchTerms}', searchTerms); + const searchQuery = searchUrl.replace('{searchTerms}', searchTerms); - fetch(openSearchQueryUrl) + fetch(searchQuery) .then((response) => response.text()) .then((xml) => { - // Parse the OpenSearch XML response (you may need to use an XML parser library) - const data = parseResponse(xml); // Implement a function to parse the XML response - - // Handle the data (e.g., update your Vue component's state with the search results) + // need XML parser library + const data = parseResponse(xml); this.dataHandler(data); }) .catch((error) => {