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

Feature: get the encoded data ready for sending (for async interop)

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

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
api

Hướng nghiên cứu

Start by reading pywebpush.WebPusher and the functions that currently accept curl=True, focusing on how the push request is encoded and sent. Define an official way to return the endpoint, encoded data, and headers so callers can use another HTTP library, then verify that existing sending behavior remains intact.

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

Mô tả

Hello,
It would be nice to be able to just get the encoded push request so we could use another http library for sending the request. Our motivation is to do this in an async framework, but there could be others.

Now we do this by monkeypatching the library:

import pywebpush
pywebpush.WebPusher.as_curl = lambda self, endpoint, data, headers: {'endpoint': endpoint, 'data': data, 'headers': headers}

then we can just pass curl=True to any function and get the data we want. But it would be nicer to do this in an official way.

Ngôn ngữ chính
Python
Star
380
Fork
61
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

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

  • Không có Dockerfile hay tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

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 web-push-libs/pywebpush

Tất cả issue của web-push-libs/pywebpush

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.