From Protobuf's Google, Protocol buffers are Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data – think XML, but smaller, faster, and simpler.
You define how you want your data to be structured once, then you can use special generated source code to easily write and read your structured data to and from a variety of data streams and using a variety of languages.
Proxyamn is capable of reading a Protobuf Binary and parsing to JSON Format with given Protobuf Schema.
This guide describes how to use the protocol buffer language to structure your protocol buffer data, including
.protofile syntax and how to generate data access classes from your
Proxyman supports both proto2 and proto3 syntax. Read more
Defind a Protobuf Config for matching URL:
Matching URL (Support wildcard)
Include all subpaths
All subpath of this URL is automatically matched
ANY or Exact certain HTTP Method
The Class name of the root object in Protobuf binary. Must include Package name
Payload Type: Auto
Auto detect if the Protobuf Binary is encoding as a Single Message or Delimited Message
Payload Type: Single Message
Single Mesage in a Protobuf Binary
Payload Type: Delimited Message
Multiple Messages in a Protobuf Binary (Length-Prefix)
There are two ways to parse Protobuf properly with qualified name fields:
Define Protobuf Rules
Read from Content-Type Header
Make a request, which has
Content-Type: application/x-protobuf or
You can see the Warning that Proxyman couldn't parse properly due to the absence of Message Type. Click Add to open Protobuf Settings
3. Add Schema and fill Message type and Payload Type
4. Click Add and see qualified JSON Format
You can dynamically provide the Protobuf Config from
For example: Your
Content-Type in the Request or Response might look like:
Content-Type: application/x-protobuf; messageType="tutorial.Address"; delimited=true
Content-Type: application/x-protobuf; messageType="com.proxyman.User"; delimited=false
To specify that the Protobuf Body this MessageType and the payload encoding.
There is a situation that some fieldnames are absent because the fieldname definition is not including in your Protobuf Schema List. It might be your Schema is out of date.
Remove old Protobuf Schema and Add a latest Schema from your server