Python 2.7 はサポートが終了しており、2026 年 1 月 31 日に
非推奨になります。非推奨になると、過去に組織のポリシーを使用して以前のランタイムのデプロイを再度有効にしていた場合でも、Python 2.7 アプリケーションをデプロイできなくなります。既存の Python 2.7 アプリケーションは、
非推奨日以降も引き続き実行され、トラフィックを受信します。
サポートされている最新バージョンの Python に移行することをおすすめします。
HttpTransport クラス
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
HttpTransport クラスは、HTTP サーバーと通信するためのトランスポートを提供します。
HttpTransport
は protorpc.transport
モジュールによって提供されます。
コンストラクタ
-
class HttpTransport
(service_url, protocol=protobuf)
-
HttpTransport オブジェクトをインスタンス化します。
引数
- service_url
-
サービスが配置されている URL。トランスポート経由のすべての通信は、この URL でメソッドに渡されます。
- protocol
-
プロトコルの実装。
encode_message()
と decode_message()
を実装する必要があります。これらは、protorpc.protojson
、protorpc.protobuf
、protorpc.protojson
などのその他のプロトコルで使用できます。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-09-04 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["わかりにくい","hardToUnderstand","thumb-down"],["情報またはサンプルコードが不正確","incorrectInformationOrSampleCode","thumb-down"],["必要な情報 / サンプルがない","missingTheInformationSamplesINeed","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-09-04 UTC。"],[[["\u003cp\u003e\u003ccode\u003eHttpTransport\u003c/code\u003e facilitates communication with HTTP servers, acting as a transport mechanism.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eprotorpc.transport\u003c/code\u003e module provides the \u003ccode\u003eHttpTransport\u003c/code\u003e class.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eHttpTransport\u003c/code\u003e constructor requires a \u003ccode\u003eservice_url\u003c/code\u003e to specify the location of the service for communication.\u003c/p\u003e\n"],["\u003cp\u003eA protocol implementing \u003ccode\u003eencode_message()\u003c/code\u003e and \u003ccode\u003edecode_message()\u003c/code\u003e, like those in \u003ccode\u003eprotorpc.protojson\u003c/code\u003e or \u003ccode\u003eprotorpc.protobuf\u003c/code\u003e, is also required in the constructor.\u003c/p\u003e\n"]]],[],null,["# The HttpTransport Class\n\nThe HttpTransport class provides a transport for communicating with HTTP servers.\n\n`HttpTransport` is provided by the `protorpc.transport` module.\n\nConstructor\n-----------\n\n\nclass HttpTransport\n(service_url, protocol=protobuf)\n\n:\n Instantiates an HttpTransport object.\n\n **Arguments**\n\n service_url\n :\n The URL where the service is located. All communication via the transport will go to methods under this URL.\n\n protocol\n :\n The protocol implementation. Must implement `encode_message()` and `decode_message()`, which are available in outside other protocols, such as `protorpc.protojson`, `protorpc.protobuf`, and `protorpc.protojson`."]]