Dissecting site to clone AJAX request and get XML
<p>I'm trying to develop an Android app that shows data from a site.  </p>

<p>So here is the deal, i've got this site: <a href="http://gps.skgt-bg.com/Web/SelectByLine.aspx" rel="nofollow">http://gps.skgt-bg.com/Web/SelectByLine.aspx</a> (It's in Bulgarian)<br>
It uses ASP.NET and Ajax to get the approximate arrival time of the buses in my city, based on the GPS aboard the buses.  </p>

<p>So basically you choose the type of transport (the first drop down list), the line's number (the second), the heading of the bus (radio buttons) and the stop, where you are at (third drop down list).  It returns the hour and minute at which the bus is expected to be at the stop, time of calculation of the result and a map of the bus stop. I'm only interested in the expected hour and minute.  </p>

<p>I'd like to figure out the request that it sends to the server, so i can replicate it in my app, get an XML back and show the time in my app.  </p>

<p>First of all i'm not that experienced in ASP.NET, so I don't know if there are some kind of security measures, protecting against this sort of thing, if so - i'm sorry of wasting your time, but my research so far doesn't indicate that. </p>

<p>Using Firebug i manage to figure out that it sends WebResource.axd some parameters identifying the assembly on the server that i'm interested in and a time stamp to verify if there've been any changes.  </p>

<p>My question is is this doable, will the parameters change so much that my app will require constant updates?
And also how can i request the xml?</p>

<p>I see the following javascript code, requesting the xml in the site</p>

<pre><code>xmlRequest.open("POST", theForm.action, true);
xmlRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xmlRequest.send(postData);
</code></pre>

<p>But I can't really figure it out, even though i googled the methods.
Does "application/x-www-form-urlencoded" mean that the url is encoded and I can't reproduce the request?</p>

<p>If you could point me to some literature to figure it out, i'd be very grateful.</p>

<p>Best regards,</p>

<p>Andrew</p>
