Skip to content

Commit

Permalink
Use application/cbor-seq media type in streaming CBOR responses.
Browse files Browse the repository at this point in the history
The media type application/cbor describes exactly one encoded item. As a new (to Kubernetes) format
with no existing clients, streaming/watch responses will use the application/cbor-seq media
type. CBOR watch responses conform to the specification of CBOR Sequences and are encoded as the
concatenation of zero or more items with no additional framing.

Kubernetes-commit: 504f14998e920ca8837b3310094b3da11c62a070
  • Loading branch information
benluddy authored and k8s-publishing-bot committed Nov 1, 2024
1 parent d70754f commit 8019856
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pkg/runtime/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,11 @@ type TypeMeta struct {
}

const (
ContentTypeJSON string = "application/json"
ContentTypeYAML string = "application/yaml"
ContentTypeProtobuf string = "application/vnd.kubernetes.protobuf"
ContentTypeCBOR string = "application/cbor"
ContentTypeJSON string = "application/json"
ContentTypeYAML string = "application/yaml"
ContentTypeProtobuf string = "application/vnd.kubernetes.protobuf"
ContentTypeCBOR string = "application/cbor" // RFC 8949
ContentTypeCBORSequence string = "application/cbor-seq" // RFC 8742
)

// RawExtension is used to hold extensions in external versions.
Expand Down

0 comments on commit 8019856

Please sign in to comment.