grpc / grpc-web

gRPC for Web Clients
https://grpc.io
Apache License 2.0
8.45k stars 760 forks source link

Are there any plans to simplify the request #1402

Closed sunny1d closed 2 weeks ago

sunny1d commented 4 months ago

Now I create a new request that looks like this:

   let request = new xxx.Request();
    request.setName('name');
    request.setAge(12);

I want to implement the request like this:

  let request = new xxx.Request({
      name:'name',
      age:12
  });
sampajano commented 4 months ago

Hi! So basically what we currently have is part of the JS protobuf API, and it's not likely to change for the lifespan of the project.

Although, we are actually looking into alternative "protobuf" solutions overall, so when that happens i think something like you proposed could be possible :)

sampajano commented 2 weeks ago

Closing for now. Feel free to re-open and follow up later if there are more updates. Thanks!