Class ElasticsearchResponseBase
- Namespace
- Elasticsearch.Net
- Assembly
- Elasticsearch.Net.dll
A response from elasticsearch including details about the request/response life cycle
public abstract class ElasticsearchResponseBase : IApiCallDetails, IElasticsearchResponse
- Inheritance
-
ElasticsearchResponseBase
- Implements
- Derived
- Inherited Members
Constructors
ElasticsearchResponseBase()
protected ElasticsearchResponseBase()
Properties
ApiCall
Sets and returns the IApiCallDetails diagnostic information
public IApiCallDetails ApiCall { get; set; }
Property Value
AuditTrail
public List<Audit> AuditTrail { get; }
Property Value
DebugInformation
A lazy human readable string representation of what happened during this request for both successful and failed requests.
public string DebugInformation { get; }
Property Value
DeprecationWarnings
A collection of deprecation warnings returned from Elasticsearch.
Used to signal that the request uses an API feature that is marked as deprecated
public IEnumerable<string> DeprecationWarnings { get; }
Property Value
HttpMethod
The HTTP method used by the request
public HttpMethod HttpMethod { get; }
Property Value
HttpStatusCode
The HTTP status code as returned by Elasticsearch
public int? HttpStatusCode { get; }
Property Value
- int?
OriginalException
If Success is false
, this will hold the original exception.
This will be the orginating CLR exception in most cases.
public Exception OriginalException { get; }
Property Value
RequestBodyInBytes
The raw byte request message body, only set when DisableDirectStreaming() is set on Connection configuration
public byte[] RequestBodyInBytes { get; }
Property Value
- byte[]
ResponseBodyInBytes
The raw byte response message body, only set when DisableDirectStreaming() is set on Connection configuration
public byte[] ResponseBodyInBytes { get; }
Property Value
- byte[]
ResponseMimeType
The response mime type
public string ResponseMimeType { get; }
Property Value
Success
The response status code is in the 200 range or is in the allowed list of status codes set on the request.
public bool Success { get; }
Property Value
SuccessOrKnownError
The response is successful or has a response code between 400-599, the call should not be retried. Only on 502,503 and 504 will this return false;
public bool SuccessOrKnownError { get; }
Property Value
Uri
The url as requested
public Uri Uri { get; }
Property Value
- Uri
Methods
ToString()
public override string ToString()
Returns
TryGetServerErrorReason(out string)
protected virtual bool TryGetServerErrorReason(out string reason)
Parameters
reason
string