Thanks for detailed response Don. I have sorted this out.
On May 16, 8:26 am, Don Kelly <
kar...@gmail.com> wrote:
> The issue you're having is a little more complicated than just using
> curl to make the request. HTTP requests can be made with a few
> different "verbs" denoting what you're trying to accomplish. In REST
> (
http://en.wikipedia.org/wiki/Representational_state_transfer) terms,
> they are:
>
> - GET: retrieving someting
> - POST: creating something
> - PUT: updating something
> - DELETE: destroying something
>
> The live REST api is actually POST-driven. Your browser is making a GET request.
>
> Further, even if you change your code from GET to POST, the URL you've
> posted still won't work. This particular REST api requires that you
> place the parameters in the POST data of the request. You can do this
> with curl using the -d option:
>
> curl -d "appID={appID}&apiKey={apiKey}&stopNo=7659"
https://api.octranspo1.com/v1.1/GetRouteSummaryForStop
>
> For the actual code you're writing, you'll need to refer to the docs
> for your HTTP client library to figure out how to pass POST data.
>
> Don/
>
> On Tue, May 15, 2012 at 10:27 PM, Makaveli <
klaus....@gmail.com> wrote:
> > I have not been able to get a response from this REST API. When I
> > submit the following query string:
>