Documentation

Here you can find sample code to implement our API.



URLConnection myURLConnection=null;
URL myURL=null;
BufferedReader reader=null;
//encoding message
String encoded_message=URLEncoder.encode(message);
//Send SMS API
String mainUrl="You can find http API url from http://indianrailapi.com/IndianRail/API";
try
{
    //prepare connection
    myURL = new URL(mainUrl);
    myURLConnection = myURL.openConnection();
    myURLConnection.connect();
    reader= new BufferedReader(new InputStreamReader(myURLConnection.getInputStream()));
    //reading response
    String response;
    while ((response = reader.readLine()) != null)
    //print response
    Log.d("RESPONSE", ""+response);
    //finally close connection
    reader.close();
}
catch (IOException e)
{
	e.printStackTrace();
}
Contributed By : Nimesh Bansal
Note: If you are too beginner in development, you can use our services in Rs. 500.(Only for paid users.) (C#.Net, VB.Net, JQuery, AngularJS Only.)
Developers are requested to contact at admin@indianrailapi.com with sample code to become support members. Sample code must be uploaded in github, google drive and so on.