Skip to content

Pass GCM (Now FCM) responses to object outputs and not just to the debugger #110

@acedip

Description

@acedip

Here are typical debug messages when debug=True is set

gcm_response = gcm.plaintext_request(registration_id=args.receiver, data=data)

[2016-05-25 00:41:02,647 - DEBUG - gcm.py:242 - log()] Request is_json: False
[2016-05-25 00:41:02,675 - INFO - connectionpool.py:760 - _new_conn()] Starting new HTTPS connection (1): fcm.googleapis.com
[2016-05-25 00:41:02,865 - DEBUG - connectionpool.py:387 - _make_request()] "POST /fcm/send HTTP/1.1" 200 None
[2016-05-25 00:41:02,882 - DEBUG - gcm.py:242 - log()] Response status: 200 OK
[2016-05-25 00:41:02,914 - DEBUG - gcm.py:242 - log()] Response headers: {'Alternate-Protocol': '443:quic', 'X-XSS-Protection': '1; mode=block
', 'X-Content-Type-Options': 'nosniff', 'Content-Encoding': 'gzip', 'Transfer-Encoding': 'chunked', 'Expires': 'Tue, 24 May 2016 19:11:49 GMT'
, 'Server': 'GSE', 'Cache-Control': 'private, max-age=0', 'Date': 'Tue, 24 May 2016 19:11:49 GMT', 'X-Frame-Options': 'SAMEORIGIN', 'Alt-Svc':
 'quic=":443"; ma=2592000; v="34,33,32,31,30,29,28,27,26,25"', 'Content-Type': 'text/plain; charset=UTF-8'}
[2016-05-25 00:41:02,937 - DEBUG - gcm.py:242 - log()] Response data: id=0:1464117109645732%9b7c3cb6f9fd7ecd

But the response of plaintext_request is a (gcm_response) NoneType Object. Is there a way the relevant response from the debug messages is passed as a response of gcm objects.
This probably could also be a feature request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions