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
などのその他のプロトコルで使用できます。