Wednesday, March 28, 2012

Re: [android-developers] C# webclient in Android/Java

you need use KSOAP2 to do it 

Vào 15:16 Ngày 27 tháng 3 năm 2012, Brofalad <hihansson@gmail.com> đã viết:
Hi,

I have this example code in C#, but I what to use Android/Java

C#/.NET
var baseUrl = "https://eventor.orientering.se/api/";
var client = new System.Net.WebClient();
client.Headers.Add("ApiKey", "99xxxxxxxxxxxxxxxxxxxxxxxxxxxxxd0307");
var bytes = client.DownloadData(baseUrl +
"events?fromDate=2010-04-01&toDate=2010-04-30");
var responseString = System.Text.Encoding.UTF8.GetString(bytes);

How do I convert this to Java?

//Brofalad

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en



--
NGO HAI NAM
Hanoi University of Technology





--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment