Finally worked out how to log in and get a session token with API-NG.
Could someone show me how to use Keep Alive? Preferably with the HttpWebRequest class.
I tried this (adapting a login example given by someone on this forum):
string uri = string.Format("https://identitysso.betfair.com/api/keepAlive");
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(uri);
req.Accept = "application/json";
req.Headers.Add("X-Authentication", sessionToken);
req.Method = "POST";
req.Timeout = 5000;
WebResponse resp = req.GetResponse();
But it doesn't seem to work.
Thanks.
Could someone show me how to use Keep Alive? Preferably with the HttpWebRequest class.
I tried this (adapting a login example given by someone on this forum):
string uri = string.Format("https://identitysso.betfair.com/api/keepAlive");
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(uri);
req.Accept = "application/json";
req.Headers.Add("X-Authentication", sessionToken);
req.Method = "POST";
req.Timeout = 5000;
WebResponse resp = req.GetResponse();
But it doesn't seem to work.
Thanks.



Comment