JSON has application/json
as a standard. For protobuf some people use application/x-protobuf
, but I saw something as odd as application/vnd.google.protobuf
being proposed. Do we have an RFC or some other standard that I can use as a reference for this?
There's an expired IETF proposal that suggests application/protobuf
. It does not address the question how the receiving side could determine the particular message type. Previous discussions suggested using a parameter to specify package and message, e.g. application/protobuf; proto=org.some.Message
In practice, the types you listed seem to be indeed the ones in use, for example the monitoring system Prometheus uses application/vnd.google.protobuf
, and the Charles web debugging proxy recognizes application/x-protobuf; messageType="x.y.Z"
.
-
-
Prometheus no longer supports protobuf: github.com/OpenObservability/OpenMetrics/blob/master/markdown/… – Will Sep 6 '20 at 20:12
application/octet-stream
: github.com/google/protorpc/commit/… – Marc Gravell♦ May 28 '15 at 12:01application/protobuf
, however: that is only a draft and kinda looks like it didn't go anywhere and is now expired – Marc Gravell♦ May 28 '15 at 12:02