Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Airbyte CDK (test): HttpResponse add headers #34910

Closed
artem1205 opened this issue Feb 6, 2024 · 1 comment
Closed

Airbyte CDK (test): HttpResponse add headers #34910

artem1205 opened this issue Feb 6, 2024 · 1 comment
Assignees
Labels

Comments

@artem1205
Copy link
Collaborator

Topic

add headers to HttpResponse

Relevant information

In Github, nex_page is obtained from the headers:

airbyte-cdk/python/airbyte_cdk/test/mock_http/response.py

Suggestion

add headers property to object

class HttpResponse:
    def __init__(self, body: str, status_code: int = 200, headers: dict = {}):
        self._body = body
        self._status_code = status_code
        self._headers = headers

    @property
    def body(self) -> str:
        return self._body
    @property
    def status_code(self) -> int:
        return self._status_code

    @property
    def headers(self) -> dict:
        return self._headers
@maxi297
Copy link
Contributor

maxi297 commented Feb 6, 2024

nit: we would also need to update

response_list=[{"text": response.body, "status_code": response.status_code} for response in responses],

@maxi297 maxi297 self-assigned this Feb 9, 2024
@maxi297 maxi297 closed this as completed Feb 12, 2024
jatinyadav-cc pushed a commit to ollionorg/datapipes-airbyte that referenced this issue Feb 21, 2024
jatinyadav-cc pushed a commit to ollionorg/datapipes-airbyte that referenced this issue Feb 26, 2024
jatinyadav-cc pushed a commit to ollionorg/datapipes-airbyte that referenced this issue Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants