I have a fetch function that takes a URL and gives out the response.
public getHTTPResponse(URL : string) {
fetch(URL).then(function(response) {
return response;
})
}
I try to use the response in a IF-statement.
For example if the response is 200
it should be true. So far I have:
if (this.getHTTPResponse(item.ListUrl) === )
Where item.ListUrl
is a link. I can't get my head around on what I should have on the right side of the operator to test if the response is 200
(or any other for that matter). Any help?