@@ -66,8 +66,9 @@ etc), but be sure that your receiving application is able to parse and
66
66
understand it. (e.g. ``data = "Mary had a little lamb." ``)
67
67
68
68
*content\_ type * - specifies the form of Encryption to use, either
69
- ``'aesgcm' `` or the newer ``'aes128gcm' ``. NOTE that not all User Agents
70
- can decrypt ``'aes128gcm' ``, so the library defaults to the older form.
69
+ ``'aes128gcm' `` or the deprecated ``'aesgcm' ``. NOTE that not all User
70
+ Agents can decrypt ``'aesgcm' ``, so the library defaults to the RFC 8188
71
+ standard form.
71
72
72
73
*vapid\_ claims * - a ``dict `` containing the VAPID claims required for
73
74
authorization (See
@@ -129,8 +130,8 @@ object.
129
130
130
131
The following methods are available:
131
132
132
- ``.send(data, headers={}, ttl=0, gcm_key="", reg_id="", content_encoding="aesgcm ", curl=False, timeout=None) ``
133
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
133
+ ``.send(data, headers={}, ttl=0, gcm_key="", reg_id="", content_encoding="aes128gcm ", curl=False, timeout=None) ``
134
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
134
135
135
136
Send the data using additional parameters. On error, returns a
136
137
``WebPushException ``
@@ -150,7 +151,7 @@ system) This is the API key obtained from the Google Developer Console.
150
151
*reg\_ id * Google Cloud Messaging registration ID (will be extracted from
151
152
endpoint if not specified)
152
153
153
- *content\_ encoding * ECE content encoding type (defaults to "aesgcm ")
154
+ *content\_ encoding * ECE content encoding type (defaults to "aes128gcm ")
154
155
155
156
*curl * Do not execute the POST, but return as a ``curl `` command. This
156
157
will write the encrypted content to a local file named
@@ -168,8 +169,8 @@ to send from Chrome using the old GCM mode:
168
169
169
170
WebPusher(subscription_info).send(data, headers, ttl, gcm_key)
170
171
171
- ``.encode(data, content_encoding="aesgcm ") ``
172
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
172
+ ``.encode(data, content_encoding="aes128gcm ") ``
173
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
173
174
174
175
Encode the ``data `` for future use. On error, returns a
175
176
``WebPushException ``
@@ -178,7 +179,7 @@ Encode the ``data`` for future use. On error, returns a
178
179
179
180
*data * Binary string of data to send
180
181
181
- *content\_ encoding * ECE content encoding type (defaults to "aesgcm ")
182
+ *content\_ encoding * ECE content encoding type (defaults to "aes128gcm ")
182
183
183
184
**Example **
184
185
0 commit comments