Open
Description
https://cloud.google.com/endpoints/docs/grpc/transcoding
is possible to generate a http client from a proto like:
syntax = "proto3";
package api.hellp;
service GreeterService {
rpc Hello(HelloRequest) returns (HelloReply) {
option (google.api.http) = {
post: "/hello/{name}",
body: "*",
};
};
}
message HelloRequest {
string name = 1;
string sentence = 2;
}
message HelloReply {}
Expect ouput like:
export class HelloServiceClientImpl {
constructor(http = fetch) {
this.http = http;
}
hello(request: HelloRequest) => {
const localVarPath = `/v1/dentities/{id}`
const url = localVarPath.replace('{id}', request.id);
return this.http({
url,
method: 'post',
data: request,
})
}
}
Metadata
Metadata
Assignees
Labels
No labels