Hi Team,
Is there a way to pass protobuf format data to rest endpoints in K6?
I can see the documentation that we can pass the protobuf by creating a grpc client. But my requirement is to pass the protobuf format to rest endpoints. That means service is Rest based and accepts a protobuf format.
Hi @Shekhar_S, welcome to the community forum !
Is there a way to pass protobuf format data to rest endpoints in K6?
As long as you can generate it you can send it as an ArrayBuffer and that will work.
While k6/grpc knows how to format protobuf for itself it does not expose this functionality to anything else, so this is currently not possible natively. There is an open issue which hasn’t been prioritized, and is unlikely to be given our current prioritize.
We are welcoming PRs, but this likely will need some more design so it might not be a great first issue
A user have reported being able to generate the protobuf message in js only. But I haven’t tested it and it seems to involve multiple steps given previous comments.
Hello @Shekhar_S!
Have a look at my post here - it hasn’t been tested against an actual implementation but if you’re able to use it to test your server, that would be great to know.