Skip to content
This repository was archived by the owner on Dec 5, 2025. It is now read-only.

Commit 13fe0ca

Browse files
[client] Use urljoin to create API URL (#549)
1 parent 8405c5b commit 13fe0ca

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pycti/api/opencti_api_client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import io
55
import json
66
from typing import Union
7+
from urllib.parse import urljoin
78

89
import magic
910
import requests
@@ -129,7 +130,7 @@ def __init__(
129130

130131
# Define API
131132
self.api_token = token
132-
self.api_url = url + "/graphql"
133+
self.api_url = urljoin(url, "/graphql")
133134
self.request_headers = {
134135
"User-Agent": "pycti/" + __version__,
135136
"Authorization": "Bearer " + token,

0 commit comments

Comments
 (0)