I am getting a response
“executed successfully” in text/html format from API with status code 200.
I want to show response
to user through notification.
I tried to store that response in response
but It’s not working, I’m getting blank response
.
Export const abctrigger = (payload, signal) => {
Return fetch(API_URL, {
method: post,
Signal: signal
Body: JSON.stringify(payload),
headers: {
Content-Type : 'application/json'
}
})
.then((response) => response.text())
.then((response) => {
Return response;
})
}
I tried by changing and removing headers and also used .text()
method but still getting problem.
Everything is working fine in backend.
I want to store text/html format response from API in response
and show that to user through notification.