send credentials if provided
parent
71ec2bbf2b
commit
278c652d6f
|
@ -47,6 +47,9 @@ func (c *Client) Query(q Query) (*Results, error) {
|
|||
u := c.url
|
||||
|
||||
u.Path = "query"
|
||||
if c.username != "" {
|
||||
u.User = url.UserPassword(c.username, c.password)
|
||||
}
|
||||
values := u.Query()
|
||||
values.Set("q", q.Command)
|
||||
values.Set("db", q.Database)
|
||||
|
|
Loading…
Reference in New Issue