Link to home
Start Free TrialLog in
Avatar of rnsr
rnsrFlag for India

asked on

need web page content c#

I am using c# console application.
i used like this but failed to get dymanic data
1.   string URL = "https://ecomexpress.in/tracking/?awb_field=852156111";
using (var client = new WebClient())
{
    client.Headers["Content-Type"] = "application/json; charset=UTF-8";
var json = client.UploadString(URL, JsonConvert.SerializeObject(new { awb_field = "852156111", Ubi = "", IrlVilationId = "", IsSecured = "" }));
}
2.
          WebClient client = new WebClient();
            client.Headers.Add("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)");
            Stream data = client.OpenRead(url);
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

i thought you wish to get the data not the html?

it seems that your page is actually calling another api to get json string returned?

https://kateeye.ecomexpress.in:9247/api/v1/cust_dashboard/awb_web_search/852156111
Avatar of rnsr

ASKER

Thank you sir. Can i integrate  this url init into my project.
ASKER CERTIFIED SOLUTION
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rnsr

ASKER

Sir,  is there any url for getting India post tracking in similar way.
Avatar of rnsr

ASKER

Great Help. Thanks.