Skip to content

Commit

Permalink
🎨 [#4908] Remove creating of url
Browse files Browse the repository at this point in the history
It is sufficient to only pass the relative endpoint to the .post method
  • Loading branch information
viktorvanwijk committed Dec 20, 2024
1 parent 50e082e commit c396b9f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/openforms/registrations/contrib/json/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,11 @@ def register_submission(self, submission: Submission, options: OptionsT) -> None
service = options["service"]
# TODO-4098: is the service type relevant here?
with build_client(service) as client:
url = f"{client.base_url}{options['relative_api_endpoint']}"
response = client.post(url, json=json, headers={"Content-Type": "application/json"})
response = client.post(
options["relative_api_endpoint"],
json=json,
headers={"Content-Type": "application/json"},
)
response.raise_for_status()
print(response.json())

Expand Down

0 comments on commit c396b9f

Please sign in to comment.