string frmDateTime = txtfromdate.Text;
string Todate = txtTodate.Text;
var frmstr = HttpUtility.ParseQueryString(frmDateTime);
var Tostr = HttpUtility.ParseQueryString(Todate);
var uri = "https://api.flipkart.net/sellers/v2/orders/search/orderDate?fromDate=" + frmstr + "&toDate =" + Tostr;
var client = new WebClient();
client.Headers.Add("X", "Y");
var inforesponse = client.DownloadString(new Uri(uri)); //error-- The remote server returned an error: (401) Unauthorized.
if (inforesponse != null)
{
}
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Rajeesh MenothRank #118 · 18.4K reputationPosted Jan 5, 2016, 6:32 AM EST
ankit chourasia95 reputationPosted Jan 6, 2016, 9:11 PM EST