88import jwt
99import requests
1010from requests .adapters import HTTPAdapter
11+ from requests .packages .urllib3 .util .retry import Retry
1112from requests .structures import CaseInsensitiveDict
12- from urllib3 .util .retry import Retry
1313
1414from pbench .server import JSON , PbenchServerConfig
1515
@@ -53,7 +53,7 @@ def _method(
5353
5454 Args:
5555 method : The API HTTP method
56- path : Path for the request.
56+ path : Path for the request (must begin with a slash) .
5757 data : Form data to send with the request in case of the POST
5858 json : JSON data to send with the request in case of the POST
5959 kwargs : Additional keyword args
@@ -64,7 +64,7 @@ def _method(
6464 final_headers = self .headers .copy ()
6565 if headers is not None :
6666 final_headers .update (headers )
67- url = self .server_url + "/" + path
67+ url = self .server_url + path
6868 request_dict = dict (
6969 params = kwargs ,
7070 data = data ,
@@ -321,7 +321,7 @@ def __repr__(self):
321321 )
322322
323323 def set_oidc_public_key (self ):
324- realm_public_key_uri = f"realms/{ self ._realm_name } "
324+ realm_public_key_uri = f"/ realms/{ self ._realm_name } "
325325 response_json = self ._connection .get (realm_public_key_uri ).json ()
326326 public_key = response_json ["public_key" ]
327327 pem_public_key = "-----BEGIN PUBLIC KEY-----\n "
0 commit comments