Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

Commit

Permalink
fix: add debug mode to disable ssl certificate verification
Browse files Browse the repository at this point in the history
  • Loading branch information
miwurster committed Dec 6, 2023
1 parent 7e073b5 commit ea2c4d8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion planqk/qiskit/client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,10 @@ def get_credentials(cls):
@classmethod
def perform_request(cls, request_func: Callable[..., Response], url: str, params=None, data=None, headers=None):
headers = {**cls._get_default_headers(), **(headers or {})}
debug = os.environ.get("PLANQK_QUANTUM_DEBUG", "false").lower() == "true"

try:
response = request_func(url, json=data, params=params, headers=headers)
response = request_func(url, json=data, params=params, headers=headers, verify=not debug)
response.raise_for_status()
return response.json() if response.status_code != 204 else None
except requests.exceptions.ConnectionError as e:
Expand Down

0 comments on commit ea2c4d8

Please sign in to comment.