grpc / grpc-web

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

[ISSUE] POST http://localhost:8080/helloworld.v1.Greeter/SayHello 404 (Not Found) #1325

Closed vzool closed 8 months ago

vzool commented 1 year ago

Screenshot 1444-08-29 at 11 39 19 AM Screenshot 1444-08-29 at 11 39 55 AM

syntax = "proto3";

package helloworld.v1;

import "google/api/annotations.proto";

option go_package = "aseel-server/api/helloworld/v1;v1";
option java_multiple_files = true;
option java_package = "dev.kratos.api.helloworld.v1";
option java_outer_classname = "HelloworldProtoV1";

// The greeting service definition.
service Greeter {
  // Sends a greeting
  rpc SayHello (HelloRequest) returns (HelloReply) {
    option (google.api.http) = {
      get: "/helloworld/{name}"
    };
  }
}

// The request message containing the user's name.
message HelloRequest {
  string name = 1;
}

// The response message containing the greetings
message HelloReply {
  string message = 1;
}

Any suggestions?

vzool commented 1 year ago

Versions

➜ protoc --version 
libprotoc 22.2

➜ go version       
go version go1.20.1 darwin/amd64

➜ flutter --version
Flutter 3.7.7 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 2ad6cd72c0 (13 days ago) • 2023-03-08 09:41:59 -0800
Engine • revision 1837b5be5f
Tools • Dart 2.19.4 • DevTools 2.20.1
vzool commented 1 year ago

Based on proto file above, the request GET should be sent to http://localhost:8080/helloworld/{name} instead of POST request to http://localhost:8080/helloworld.v1.Greeter/SayHello. Why does it behave like that?

sampajano commented 1 year ago

@vzool Hi!

It seems that you're using grpc Dart. I wonder if this is a https://github.com/grpc/grpc-dart issue instead?

sampajano commented 8 months ago

Closing since this seems to be a dart issue :)