mirror of
https://github.com/simonw/dclient.git
synced 2026-07-25 10:24:33 +02:00
Follow redirects on query
Means that the 1.0 feature where /db?sql is now /db/-/query?sql works
This commit is contained in:
parent
32124a0bf3
commit
166798c87c
1 changed files with 1 additions and 1 deletions
|
|
@ -49,7 +49,7 @@ def query(url_or_alias, sql, token, verbose):
|
|||
params = {"sql": sql, "_shape": "objects"}
|
||||
if verbose:
|
||||
click.echo(url + "?" + urllib.parse.urlencode(params), err=True)
|
||||
response = httpx.get(url, params=params, headers=headers)
|
||||
response = httpx.get(url, params=params, headers=headers, follow_redirects=True)
|
||||
|
||||
if response.status_code != 200:
|
||||
# Is it valid JSON?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue