I’ve got a new API from the backend team in a new project, when I call the api it returns “you need to enable java…”, whereas I had used Postman for another project before… is it related to api, server or something else?
Advertisement
Answer
I spent some times pondering on this trepidation.. and then suddenly i realized what was going on..
- the endpoint does not exist, it could be a misspelling
- not in the same directory as you expect it to be,
try adding or removing “/” at the beginning of the url, particularly if you don’t specify the hostname, i.e.
fetch('getusername')
is different fromfetch('/getusername')
. . This acceptable in development but NOT when already deployed, it points to different path. - the endpoint may be working fine in the Development, but somewhere within in the Production/Staging, it generated some exception.