Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Webclient with header

64 views
Skip to first unread message

Brofalad

unread,
Mar 3, 2012, 4:38:34 AM3/3/12
to
Hi,

I have this example code in C#, but I what to use Delphi.

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

How do convert this to Delphi?

//Brofalad
0 new messages