Updated auth to use variables with default values (#16876)

* Updated auth to use variables with default values

* Update docs/api-reference/sql-ingestion-api.md

* Remove Python auth entirely as its not being used

---------

Co-authored-by: Benedict Jin <asdf2014@apache.org>
This commit is contained in:
Hugh Evans 2024-08-23 02:09:09 +01:00 committed by GitHub
parent 2aef6ac685
commit 2f6722db63
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 10 additions and 5 deletions

View File

@ -157,7 +157,7 @@ headers = {
'Content-Type': 'application/json'
}
response = requests.post(url, headers=headers, data=payload, auth=('USER', 'PASSWORD'))
response = requests.post(url, headers=headers, data=payload)
print(response.text)
@ -254,8 +254,9 @@ url = "http://ROUTER_IP:ROUTER_PORT/druid/indexer/v1/task/query-3dc0c45d-34d7-4b
payload={}
headers = {}
response = requests.get(url, headers=headers, data=payload, auth=('USER', 'PASSWORD'))
response = requests.post(url, headers=headers, data=payload)
print(response.text)
print(response.text)
```
@ -363,7 +364,10 @@ import requests
url = "http://ROUTER_IP:ROUTER_PORT/druid/indexer/v1/task/query-3dc0c45d-34d7-4b15-86c9-cdb2d3ebfc4e/reports"
headers = {}
response = requests.get(url, headers=headers, auth=('USER', 'PASSWORD'))
response = requests.post(url, headers=headers, data=payload)
print(response.text)
print(response.text)
```
@ -826,11 +830,12 @@ import requests
url = "http://ROUTER_IP:ROUTER_PORT/druid/indexer/v1/task/query-655efe33-781a-4c50-ae84-c2911b42d63c/shutdown"
payload={}
payload = {}
headers = {}
response = requests.post(url, headers=headers, data=payload, auth=('USER', 'PASSWORD'))
response = requests.post(url, headers=headers, data=payload)
print(response.text)
print(response.text)
```