I need your help to get the response or results from the API in an inputfield or as text.
here is the API
when i write the unix time stamp after the "fromunix?timestamp='timestamphere'"
i should get the date back
https://showcase.linx.twenty57.net:8081/UnixTime/fromunix?timestamp=1549892280
results ; 2019-02-11 13:38:00
i need your help please thanks.
Please kindly review this I hope it will help you if you know coding https://www.wix.com/corvid/reference/wix-fetch.html
btw this is the code if someone needs
let url = 'https://showcase.linx.twenty57.net:8081/UnixTime/fromunix? timestamp=' + $w('#Userinput').value; fetch(url, {method: 'get'}) .then( (httpResponse) => { if (httpResponse.ok) { return httpResponse.text(); } else { return Promise.reject("Fetch did not succeed"); } } ) .then((text) => { $w("#text").text = text; }) .catch(err => console.log(err)); }