が、私はこのエラーに
ChunkedEncodingErrorを取得しています:( '壊れた接続:IncompleteRead(14バイトリード)'、IncompleteRead(14バイトリード))
は、私が "リクエスト" からPOSTリクエストを作っていますライブラリ(サードパーティ)をPythonを使ってGoogle App Engineに追加しました。
ChunkedEncodingErrorはどのように修正する必要がありますか?
url = 'https://fcm.googleapis.com/fcm/send'
body = {
"data": {
"title": "data:mytitle",
"body": "data:mybody",
"url": "data:myurl"
},
"notification": {
"title": "noti:My web app name",
"body": "noti:message",
"content_available": "noti:true"
},
"message": "test",
"registration_ids": ["xxxxxxxxxxxxxxxxxxxx"]
}
headers = {"Content-Type": "application/json",
"Authorization": "key=xxxxxxxxxxxxxxxx"}
logging.error(json.dumps(body))
requests.post(url, data=json.dumps(body), headers=headers)
これは正しいです。 [Requesting HTTP(S)Requests](https://cloud.google.com/appengine/docs/standard/python/issue-requests#issuing_an_http_request)のドキュメントでは、** requests - toolbelt **を含めて、 **要求**ライブラリは、デフォルトのソケットの代わりに** URLのフェッチ**を使用します。 – Nicholas
これは機能します!私はgspreadを使ってシートを読み込もうとしていて、ChunkedEncodingErrorの問題に直面していました。今解決されました!ありがとう:) –