Fetch Api:Can not get data from localhost

I have been trying to create an android app using nativescript.I am using fetch module to get response from my server.When I am trying to get response from httpbin.org/get ,it is OK.But when I am trying to get response from my local server,I am getting Network Request Failed. error.