c# - Web requests suddenly not working -
my app makes calls api so:
debug.writeline ("making api request: " + action); var request = httpwebrequest.create("http://domain.com/api/"+ action"); request.contenttype = "application/json"; request.method = "get"; string content = "d"; using (httpwebresponse response = request.getresponse() httpwebresponse) { using (streamreader reader = new streamreader(response.getresponsestream())) { content = reader.readtoend(); } } return content;
and has been working few months. 1 day app no longer working. debugging i'm finding requests either timing out or throwing error:
(system.net.webexception) error getting response stream (readdone1): receivefailure
what error mean? , why did start? code hasn't been changed since release of app. request works when typed browser.
adding www.
urls fixed issue.
Comments
Post a Comment