-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
It appears that the RequestConfiguration property of PlainRequest is not being used during the execution of the request.
For example, it is possible to initialize a request (e.g., SearchTemplateRequest) with a custom request configuration using PlainRequest.RequestConfiguration. However, during the actual execution within the client, only Request.RequestConfig is used — which seems to be independent of the previously configured RequestConfiguration.
Example:
var requestDescriptor = new SearchTemplateRequestDescriptor()
.RequestConfiguration(x => x.DisablePing());
var response = await elasticClient.SearchTemplateAsync<object>(requestDescriptor, cancellationToken);When stepping through the execution, it becomes clear that only RequestConfig is referenced, and the configuration provided via the descriptor (e.g., DisablePing) is lost.
This seems like an oversight. There should likely be an initialization or transfer of the RequestConfiguration data to RequestConfig during request setup to preserve the intended behavior.