You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by te...@apache.org on 2024/08/23 01:09:14 UTC

(druid) branch master updated: Updated auth to use variables with default values (#16876)

This is an automated email from the ASF dual-hosted git repository.

techdocsmith pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git


The following commit(s) were added to refs/heads/master by this push:
     new 2f6722db635 Updated auth to use variables with default values (#16876)
2f6722db635 is described below

commit 2f6722db6356d9ca0a5c25afcbf2022dffbcc02c
Author: Hugh Evans <10...@users.noreply.github.com>
AuthorDate: Fri Aug 23 02:09:09 2024 +0100

    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 <as...@apache.org>
---
 docs/api-reference/sql-ingestion-api.md | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/docs/api-reference/sql-ingestion-api.md b/docs/api-reference/sql-ingestion-api.md
index 275be9e63dc..a289aeefee7 100644
--- a/docs/api-reference/sql-ingestion-api.md
+++ b/docs/api-reference/sql-ingestion-api.md
@@ -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)
 ```
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org