asp.net - webclient request via authentication -
i'm calling clients endpoint "get" json array. so
var json = new webclient().downloadstring(url);
they using authentication , have username , password. possible submit username , password. maybe need add custom headers? can't find exact examples i'm after
401 - unauthorized: access denied due invalid credentials.
you may try specify credentials:
var json = new webclient { credentials = new networkcredential(username, passwd) }.downloadstring(url);
Comments
Post a Comment