Change authentication string
- according to documentation, I'm supposed to prepend "token". However, swagger doesn't do that. They both do seem to work (i.e. they authenticate correctly), but adding "token " has a strange performance penalty.
This commit is contained in:
parent
83b9276375
commit
7bade8f3d5
|
@ -20,8 +20,7 @@ def get_combined(token):
|
|||
req = urllib.request.Request(GITEA_REPO_URL
|
||||
+ f"/repos/issues/search?state=open&{q}=true")
|
||||
req.add_header("Accept", "application/json")
|
||||
req.add_header("Content-Type", "application/json")
|
||||
req.add_header("Authorization", "token " + token)
|
||||
req.add_header("Authorization", token)
|
||||
|
||||
timestamp=datetime.datetime.now()
|
||||
print(f"{timestamp} Requesting and parsing {q}")
|
||||
|
|
Loading…
Reference in New Issue
Block a user