I am trying to call DownloadListOfFiles endpoint but unfortunately it is returning just 'Error'. Using the same code, i can call with success all the other POST endpoints, however it just fails with this one. The same POST works in PostMan
a) I am sure the ssoid is correct since if I just change the endpoint, the code works, that is I get the expected results.
b) I have 'purchased' the data I am requesting for.
c) The filter is fine since using the same filter in POSTMAN and just changing the endpoint works.
Anything else that I am missing?
JSON post:
{"sport":"Soccer","plan":"Basic Plan","fromDay":1,"fromMonth":11,"fromYear":2017," toDay":30,"toMonth":11,"toYear":2017,"eventId":nul l,"eventName":"Stoke v Leicester","marketTypesCollection":["FIRST_HALF_GOALS_15"],"countriesCollection":["GB"],"fileTypeCollection":["M"]}
C# Code below.
using (HttpClient client = new HttpClient())
{
var json = JsonConvert.SerializeObject(req);
HttpRequestMessage requestMessage = new HttpRequestMessage(HttpMethod.Post, _endPoint + GET_DOWNLOAD_LIST_OF_FILES);
requestMessage.Headers.Add("ssoid", _appKey);
var stringContent = new StringContent(json, UnicodeEncoding.UTF8, "application/json");
HttpResponseMessage response = await client.PostAsync(requestMessage.RequestUri, stringContent);
string result = await response.Content.ReadAsStringAsync();
}
Of course, the endpoint generated is correct (https://historicdata.betfair.com/api...oadListOfFiles) and the json being used is as above. Using same json in POSTMAN works, using same code to post to a different endpoint like GetAdvBasketDataSize works.
The error I get is as follows:
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>ngErrorRedirect</title>
</head>
<body>
<div>
Error
</div>
</body>
</html>
What I am missing?
Thanking you in advance.
a) I am sure the ssoid is correct since if I just change the endpoint, the code works, that is I get the expected results.
b) I have 'purchased' the data I am requesting for.
c) The filter is fine since using the same filter in POSTMAN and just changing the endpoint works.
Anything else that I am missing?
JSON post:
{"sport":"Soccer","plan":"Basic Plan","fromDay":1,"fromMonth":11,"fromYear":2017," toDay":30,"toMonth":11,"toYear":2017,"eventId":nul l,"eventName":"Stoke v Leicester","marketTypesCollection":["FIRST_HALF_GOALS_15"],"countriesCollection":["GB"],"fileTypeCollection":["M"]}
C# Code below.
using (HttpClient client = new HttpClient())
{
var json = JsonConvert.SerializeObject(req);
HttpRequestMessage requestMessage = new HttpRequestMessage(HttpMethod.Post, _endPoint + GET_DOWNLOAD_LIST_OF_FILES);
requestMessage.Headers.Add("ssoid", _appKey);
var stringContent = new StringContent(json, UnicodeEncoding.UTF8, "application/json");
HttpResponseMessage response = await client.PostAsync(requestMessage.RequestUri, stringContent);
string result = await response.Content.ReadAsStringAsync();
}
Of course, the endpoint generated is correct (https://historicdata.betfair.com/api...oadListOfFiles) and the json being used is as above. Using same json in POSTMAN works, using same code to post to a different endpoint like GetAdvBasketDataSize works.
The error I get is as follows:
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>ngErrorRedirect</title>
</head>
<body>
<div>
Error
</div>
</body>
</html>
What I am missing?
Thanking you in advance.

