Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/conductor/client/workflow/task/http_poll_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def __init__(self,
polling_strategy: str = "FIXED",
method: HttpMethod = HttpMethod.GET,
uri: Optional[str] = None,
headers: Optional[Dict[str, List[str]]] = None,
headers: Optional[Dict[str, str]] = None,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could break backward compatibility for clients that already use this. I would recommend setting it up as

headers: Optional[dict[str, str|list[str]]]

and then on line 59
self._headers = ",".join(headers) if isinstance(headers, list) else headers

perhaps?

This will not work for Set-Cookie headers as the separators are semi-colons, something that likely should be handled with another parameter.

accept: Optional[str] = None,
content_type: Optional[str] = None,
connection_time_out: Optional[int] = None,
Expand Down
2 changes: 1 addition & 1 deletion src/conductor/client/workflow/task/http_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class HttpInput:
def __init__(self,
method: HttpMethod = HttpMethod.GET,
uri: Optional[str] = None,
headers: Optional[Dict[str, List[str]]] = None,
headers: Optional[Dict[str, str]] = None,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above.

accept: Optional[str] = None,
content_type: Optional[str] = None,
connection_time_out: Optional[int] = None,
Expand Down