Fix dynamic client in protobuf configuration

This commit is contained in:
Wojciech Tyczynski
2016-05-09 13:52:10 +02:00
parent cd3ab5d82d
commit ca5f18370a

View File

@@ -52,6 +52,7 @@ func NewClient(conf *restclient.Config) (*Client, error) {
codec := dynamicCodec{}
// TODO: it's questionable that this should be using anything other than unstructured schema and JSON
conf.ContentType = runtime.ContentTypeJSON
streamingInfo, _ := api.Codecs.StreamingSerializerForMediaType("application/json;stream=watch", nil)
conf.NegotiatedSerializer = serializer.NegotiatedSerializerWrapper(runtime.SerializerInfo{Serializer: codec}, streamingInfo)