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:
parent
cd6473be9d
commit
566c3642f6
1 changed files with 3 additions and 3 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue