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
thanks Umair i did but i dont get it i need an example code.
thanks Umair Khan i finally made it to work!
@xpuehsan Thanks brother
Anything else that you want to ask?
@umairboss26 thanks not for now bro :3 but i will ask when i need help!
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));
}