Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

something wrong with service #748

Closed
vtolstov opened this issue Sep 8, 2018 · 10 comments
Closed

something wrong with service #748

vtolstov opened this issue Sep 8, 2018 · 10 comments

Comments

@vtolstov
Copy link

vtolstov commented Sep 8, 2018

I have simple service

service SshkeysService {
  rpc SshkeysGet(SshkeysReq) returns (SshkeysRes) {
    option (google.api.http) = {
      get: "/xxx/v2/account/keys/{key}"
    };
  }
}

message SshkeysRes {
  Sshkeys ssh_key = 1;
};

message SshkeysReq {
  string key = 1;
  enum SshkeysFields {
    all = 0;
    id = 1;
    name = 2;
    public_key = 3;
    fingerprint = 4;
  };
  repeated SshkeysFields fields = 2;
};

message Sshkeys {
  uint32 id = 1;
  string name = 2;
  string public_key = 3;
  string fingerprint = 4;
};

When i'm do request like

http://1.2.3.4/xxx/v2/account/keys/1

all works fine, but when i'm try to get key via fingerprint like

http://1.2.3.4/xxx/v2/account/keys/1:ab:fe

i have error: Not Implemented

@vtolstov
Copy link
Author

vtolstov commented Sep 8, 2018

I found #224 but i'm realy need to pass fingerprint that contains colons. And i'm believe that it can be possible.

@johanbrandhorst
Copy link
Collaborator

You need to URL encode your request.

@vtolstov
Copy link
Author

vtolstov commented Sep 8, 2018

@johanbrandhorst why! Colon as i know does not need to be url encoded.

@johanbrandhorst
Copy link
Collaborator

This is a duplicate of #556, right? Is this working on master?

@vtolstov
Copy link
Author

vtolstov commented Sep 8, 2018

@johanbrandhorst No, i need to receive param that contains colons via grpc-gateway for my grpc service, now i have ugly method to override param (adding trailing colon) before pass it to handler

@johanbrandhorst
Copy link
Collaborator

Sorry, I mean #566

@vtolstov
Copy link
Author

vtolstov commented Sep 8, 2018

I'm use github.com/golang/protobuf v1.2.0

@vtolstov
Copy link
Author

vtolstov commented Sep 8, 2018

I'm fetch master of grpc-gateway and now all fine. May be the time to get new release?

@johanbrandhorst
Copy link
Collaborator

Yes, we will be making a new release shortly :). See #733. Glad it's working now.

@vtolstov
Copy link
Author

vtolstov commented Sep 8, 2018

@johanbrandhorst thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants