Pregunta

I have a derived class of WebClient that overrides WebRequest to return a request object with the certificate needed to talk to our ElasticSearch cluster via proxy. How do I use this with Nest? Thanks.

¿Fue útil?

Solución

You can subclass Connection

https://github.com/Mpdreamz/NEST/blob/master/src/Nest/Domain/Connection/Connection.cs

And override

protected override HttpWebRequest CreateWebRequest(string path, string method)
{
       //return your derived WebRequest here.
}

then use this overload on ElasticClient

https://github.com/Mpdreamz/NEST/blob/master/src/Nest/ElasticClient.cs#L29

To use your custom IConnection.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top