Skip to content

Commit 47898e0

Browse files
committed
moved accepts content type to IRequestConnectioSettings
1 parent 6b5eb34 commit 47898e0

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

src/Elasticsearch.Net/Connection/IRequestConfiguration.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ public interface IRequestConfiguration : IRequestConnectionConfiguration
2323

2424
bool? PingDisabled { get; }
2525

26-
string AcceptsContentType { get; }
2726

2827
}
2928

@@ -41,7 +40,6 @@ public class RequestConfiguration<T> : RequestConnectionConfiguration<T>, IReque
4140
private Uri _forceNode;
4241
private bool? _sniffingDisabled;
4342
private bool? _pingDisabled;
44-
private string _acceptsContentType;
4543

4644
int? IRequestConfiguration.MaxRetries
4745
{
@@ -91,10 +89,6 @@ public T Retry(int retry)
9189
return (T)this;
9290
}
9391

94-
public T ContentType(string accepts)
95-
{
96-
this._acceptsContentType = accepts;
97-
return (T)this;
98-
}
92+
9993
}
10094
}

src/Elasticsearch.Net/Connection/IRequestConnectionConfiguration.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ public interface IRequestConnectionConfiguration
66
{
77
int? TimeoutRequest { get; }
88
int? TimeoutConnect { get; }
9+
string AcceptsContentType { get; }
910
}
1011

1112

@@ -30,17 +31,28 @@ public class RequestConnectionConfiguration<T> : IRequestConnectionConfiguration
3031
{
3132
get { return _timeoutConnection; }
3233
}
34+
private string _acceptsContentType;
35+
public string AcceptsContentType
36+
{
37+
get { return _acceptsContentType; }
38+
}
3339

3440
public T RequestTimeout(int request)
3541
{
3642
this._timeoutRequest = request;
3743
return (T)this;
3844
}
45+
3946
public T ConnectTimeout(int request)
4047
{
4148
this._timeoutConnection = request;
4249
return (T)this;
50+
}
51+
52+
public T ContentType(string accepts)
53+
{
54+
this._acceptsContentType = accepts;
55+
return (T)this;
4356
}
44-
4557
}
4658
}

0 commit comments

Comments
 (0)