Bugmaster
Bugmaster

Reputation: 1080

Protobuf equivalent of JsonHttpClient?

is there an equivalent of the new (-ish) JsonHttpClient that uses protobuf-net instead of JSON ? I realize that the old-style ProtobufServiceClient exists, but I'd like to replace it with something that uses HttpClient, instead of the old HttpWebRequest.

If such a client does not exist, how hard would it be to write one ? Should I just copy/paste JsonHttpClient.cs and change a few things, or is there a better way ?

Upvotes: 1

Views: 58

Answers (1)

mythz
mythz

Reputation: 143374

No there isn't another ServiceClient for ProtoBuf other than ProtobufServiceClient. The easiest approach would be to take a copy of JsonHttpClient and modify it to use ProtoBuf, but JsonHttpClient wasn't designed to support multiple Content Types so it's not going to be as straight-forward as implementing a new ServiceClient.

Upvotes: 1

Related Questions