Compare commits
2
Commits
1ac7fefb52
...
05856e081a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
05856e081a | ||
|
|
b36456da84 |
Binary file not shown.
@@ -9,15 +9,24 @@ namespace BritishHorseRacingApi
|
||||
{
|
||||
public abstract class BaseApiClient
|
||||
{
|
||||
private const int _startPort = 50010;
|
||||
protected readonly CustomHttpClient _client = new CustomHttpClient(_startPort);
|
||||
public int _port = 50010;
|
||||
public int Port
|
||||
{
|
||||
get { return _port; }
|
||||
set
|
||||
{
|
||||
_port = value;
|
||||
_client = new CustomHttpClient(_port);
|
||||
}
|
||||
}
|
||||
protected CustomHttpClient _client;
|
||||
private readonly TimeSpan? _delay;
|
||||
private DateTime _lastRequest = DateTime.UtcNow;
|
||||
|
||||
public BaseApiClient(TimeSpan? delay = null)
|
||||
{
|
||||
_client = new CustomHttpClient(_port);
|
||||
_delay = delay;
|
||||
//_client.DefaultHeaders.Add("Cookie", "bha-ie-test=true; D_SID=188.172.158.138:JT/OEx87nl5ScspTQk38UsDfuIz94DbCf5CYsIC7WpU; _ga=GA1.2.578018316.1549102711; __utmz=36595059.1549187117.8.2.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided); __utma=36595059.578018316.1549102711.1550365414.1551216842.16; __utmc=36595059; D_IID=80C3F85C-C90F-31DF-8830-AF181B9C7A2E; D_UID=33DA8B87-0FB7-3D76-9DA6-A650196A2B16; D_ZID=68EA5585-B6A0-34F7-939A-A0C1B40036B3; D_ZUID=0E647F3A-6570-32D2-9673-8B49FFEBE647; D_HID=EBE66F1F-FA2C-3373-8163-110008C50265");
|
||||
ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user