Add headers to API Request component (#1832)

♻️ (APIRequest.py): refactor APIRequest class to improve variable naming and remove unnecessary underscore prefix in headers parameter
💡 (APIRequest.py): update comments in APIRequest class to improve code readability and maintainability
This commit is contained in:
Cristhian Zanforlin Lousa 2024-05-03 17:26:11 -03:00 committed by GitHub
commit 566c3642f6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -93,14 +93,14 @@ class APIRequest(CustomComponent):
self,
method: str,
urls: List[str],
_headers: Optional[Record] = None,
headers: Optional[Record] = None,
body: Optional[Record] = None,
timeout: int = 5,
) -> List[Record]:
if _headers is None:
if headers is None:
headers = {}
else:
headers = _headers.data
headers = headers.data
bodies = []
if body: