J Juzer Hussain Active Member Licensed User Longtime User Jun 18, 2015 #1 Hi Eril, I am now a member.Just trying to get the hang of B4A to convert my library for android. Pls tell me how to call API and get the response in a variable.Following is the API. http://59.161.167.52/api/[email protected]&user=" & sUser & ":" & sPwd & "&senderID=" & sSenderID & "&receipientno=" & sNo & "&msgtxt=" & sMsg & "&state=4" Thanks
Hi Eril, I am now a member.Just trying to get the hang of B4A to convert my library for android. Pls tell me how to call API and get the response in a variable.Following is the API. http://59.161.167.52/api/[email protected]&user=" & sUser & ":" & sPwd & "&senderID=" & sSenderID & "&receipientno=" & sNo & "&msgtxt=" & sMsg & "&state=4" Thanks
lemonisdead Well-Known Member Licensed User Longtime User Jun 18, 2015 #2 Hello Juzer Hussain, Using HttpUtils2 : https://www.b4x.com/android/forum/threads/okhttp-replaces-the-http-library.54723/#content The method you are using is a GET. So you would use job.Download2 Last edited: Jun 18, 2015 Upvote 0
Hello Juzer Hussain, Using HttpUtils2 : https://www.b4x.com/android/forum/threads/okhttp-replaces-the-http-library.54723/#content The method you are using is a GET. So you would use job.Download2
J Juzer Hussain Active Member Licensed User Longtime User Jun 18, 2015 #3 lemonisdead said: Hello Juzer Hussain, Using HttpUtils2 : https://www.b4x.com/android/forum/threads/okhttp-replaces-the-http-library.54723/#content The method you are using is a GET. So you would use job.Download2 Click to expand... Thanks Lemonisdead for prompt response I will try this. Upvote 0
lemonisdead said: Hello Juzer Hussain, Using HttpUtils2 : https://www.b4x.com/android/forum/threads/okhttp-replaces-the-http-library.54723/#content The method you are using is a GET. So you would use job.Download2 Click to expand... Thanks Lemonisdead for prompt response I will try this.
J Juzer Hussain Active Member Licensed User Longtime User Jun 19, 2015 #4 Hi, I tried this way it say connection refused. Error: org.apache.http.conn.HttpHostConnectException: Connection to http://59.162.167.52 refused I have supplied each variable a value in key value pair. Sub Button1_Click Dim job1 As HttpJob job1.Initialize(job1,Me) job1.Download2("http://59.162.167.xx/api/MessageCompose", Array As String("admin", "xx" , "user", "xx:xx","senderID","STVPSB","receipientno","9827973052","msgtxt","This is a test msg from App","state","4")) This is an API which i use to send SMS from VB.Net.It goes smoothly. No username or pwd required other than this. Pls guide me. Upvote 0
Hi, I tried this way it say connection refused. Error: org.apache.http.conn.HttpHostConnectException: Connection to http://59.162.167.52 refused I have supplied each variable a value in key value pair. Sub Button1_Click Dim job1 As HttpJob job1.Initialize(job1,Me) job1.Download2("http://59.162.167.xx/api/MessageCompose", Array As String("admin", "xx" , "user", "xx:xx","senderID","STVPSB","receipientno","9827973052","msgtxt","This is a test msg from App","state","4")) This is an API which i use to send SMS from VB.Net.It goes smoothly. No username or pwd required other than this. Pls guide me.
Erel B4X founder Staff member Licensed User Longtime User Jun 20, 2015 #5 It seems like some network problem. Are you testing it on a real device? Is the device connected to the internet? Upvote 0
It seems like some network problem. Are you testing it on a real device? Is the device connected to the internet?
J Juzer Hussain Active Member Licensed User Longtime User Jun 20, 2015 #6 Erel said: It seems like some network problem. Are you testing it on a real device? Is the device connected to the internet? Click to expand... I m trying with USB Debugging, There is no network problem. I thought this would be pretty straightforward. Is there any way to create Microsoft.xmlHTTP object so i can use Send method as in VB.Net Juzer Upvote 0
Erel said: It seems like some network problem. Are you testing it on a real device? Is the device connected to the internet? Click to expand... I m trying with USB Debugging, There is no network problem. I thought this would be pretty straightforward. Is there any way to create Microsoft.xmlHTTP object so i can use Send method as in VB.Net Juzer
J Juzer Hussain Active Member Licensed User Longtime User Jun 20, 2015 #7 Juzer Hussain said: I m trying with USB Debugging, There is no network problem. I thought this would be pretty straightforward. Is there any way to create Microsoft.xmlHTTP object so i can use Send method as in VB.Net Juzer Click to expand... Hi Erel, Sorry.....,My internet was loosing network intermittently. Now its working ok.Internet was the problem. Thanks Juzer Upvote 0
Juzer Hussain said: I m trying with USB Debugging, There is no network problem. I thought this would be pretty straightforward. Is there any way to create Microsoft.xmlHTTP object so i can use Send method as in VB.Net Juzer Click to expand... Hi Erel, Sorry.....,My internet was loosing network intermittently. Now its working ok.Internet was the problem. Thanks Juzer