Hi All,

I want to develop asp.net web-site by using API provided by cleartrip. I used that API but every time I received the response as bad request. Please help me to soulve the issue.

Here is my Code:-

HttpWebRequest req = (HttpWebRequest)WebRequest.Create(http://api.staging.cleartrip.com/air/1.0/search?from=BOM&to=DEL&depart-date=2010-12-20);
 
req.Method = "Get";
req.Headers.Add("X-CT-API-KEY", "MYAPIKEY");
 
HttpWebResponse oResponse;
oResponse =(HttpWebResponse) req.GetResponse();

Plese check the attached file for erroe details. (BAD REQUEST].

Thanks

Recommended Answers

All 3 Replies

Presumably because its an invalid URL you're using?

Error 400: Requested URL invalid or incomplete

I have tried to use the website using the recommended example and it does not work - suspect the site has changed its policy for access

cleartrip apis will be avaliable in php ?

plz repy

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.