ropensci / elastic

R client for the Elasticsearch HTTP API
https://docs.ropensci.org/elastic
Other
245 stars 58 forks source link

Accessing server which uses basic auth for authentication #204

Closed dkincaid closed 6 years ago

dkincaid commented 6 years ago

We use nginx with basic auth to front our ES server. It seems like it's not currently possible to connect to this server with this package. So this is a request to add that functionality.

sckott commented 6 years ago

does this work https://github.com/ropensci/elastic/issues/177#issuecomment-305050990 for you? if not, i'll look into it

dkincaid commented 6 years ago

Right now I'm getting this:

> esconn <- elastic::connect(es_host = eshost, es_port = esport, es_user = "esprd", es_pwd = "password", es_path = "")
> elastic::ping(esconn)
Error: 400 - request [/] contains unrecognized parameters: [errors], [host], [path], [port], [pwd], [transport], [user]
sckott commented 6 years ago

ping doesn't take any parameters. can you do it again just calling it like elastic::ping()

dkincaid commented 6 years ago

Oh man. Sorry about that. Been a long day. Yeah that's working. Sorry for the trouble.

sckott commented 6 years ago

great, glad its working 👍