drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Omernik <j...@omernik.com>
Subject Re: REST API with Basic Auth
Date Thu, 24 Mar 2016 00:30:57 GMT
Yes, to do authenticated requests, I create a session object with Python
requests, post creds to the login page, get the session cookies, and them
do the queries. I do not believe Drill supports just using basic auth.
This as far as I can tell is actually a good thing because forces you to
manage session cookie which allows you to issue multiple queries such as
use schema them your query, or configure session level options.

Not sure what you are using to connect,  Python requests is really simple.

John

On Wednesday, March 23, 2016, Jean-Claude Cote <jccote@gmail.com> wrote:

> I'm trying to send queries via the /query.json REST endpoint. This works
> just fine however if I turn
>
> on authentication I get a 307 redirect to the login page.
>
> So I added the HTTP header Authorization: Basic dm9yZGVsOnZvcmRlbA==
>
> but I'm still getting a 307 redirect to the login page. Is that normal?
>
>
> Thanks
>
> Jean-Claude
>


-- 
Sent from my iThing

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message