Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Attachment downloads ignore request URL and header overrides

Đang mở
#491 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

@Kayvan-Zahiri đang làm issue này rồi.

Từ ngày 17/10/2026.

  • #492 của @Kayvan-Zahiri — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
39/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
api

Hướng nghiên cứu

Start by reading Client.attachments.download(...), download_bytes(...), and _execute_download_request, then check the _build_request argument order. Use the mocked requests.request boundary to verify both public methods honor the API URI and header overrides, omit the bodyless GET Content-type header, and report the overridden URL on timeout.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Both Client.attachments.download(..., overrides=...) and download_bytes(...) pass their options through _execute_download_request, which currently calls _build_request("GET", path, headers, query_params, overrides) positionally. The fifth argument is request_body, not overrides.

For example, a call with overrides={"api_uri": "https://override.example.test", "headers": {"X-Test": "custom"}} still uses the original API URL and omits the custom header. Any nonempty overrides also cause a JSON Content-type header on the bodyless download GET. Timeout selection itself works, but a timeout error reports the original URL when the caller supplied a different API URI.

Reproduced using both public attachment download methods, the real HTTP client, and a mocked requests.request boundary. No live API or account calls. Fourteen regression/control cases:12 fail and2 pass on main. I have a focused keyword-argument fix and tests ready.

Ngôn ngữ chính
Python
Star
109
Fork
85
Merge trung bình
8 giờ 41 phút
Pull request đã merge (30 ngày)
3

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của nylas/nylas-python

Tất cả issue của nylas/nylas-python

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.