gogo / letmegrpc

[maintainer wanted] generates a web form gui from a grpc specification
BSD 3-Clause "New" or "Revised" License
421 stars 48 forks source link

Why submit form values via GET instead of POST? #39

Open anwar-fs opened 6 years ago

anwar-fs commented 6 years ago

This is a great project! But why does the generated UI submit form values as URL parameters instead in a GET request, instead of as form POST parameters? Is there a configuration option to make the UI use POST?

awalterschulze commented 6 years ago

A GET makes it easy to hack the url. You are welcome to add a POST configuration to the project by submitting a pull request.

Be warned that although this project works and you are not the only user, the code itself is dreadful. And I am extremely sorry about that. If I had time I would totally rewrite it.

On Sun, 3 Dec 2017, 01:24 Anwar Reddick, notifications@github.com wrote:

This is a great project! But why does the generated UI submit form values as URL parameters instead in a GET request, instead of as form POST parameters? Is there a configuration option to make the UI use POST?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/gogo/letmegrpc/issues/39, or mute the thread https://github.com/notifications/unsubscribe-auth/ABvsLXvnnyTipJfxCz1PKDjxPKlm2JALks5s8epJgaJpZM4QzhwY .

anwar-fs commented 6 years ago

Noted, and no need to apologize. I understand how other priorities can get in the way. And I'm actually glad to hear your response. This project has inspired me to consider a fork that uses go templates to provide more modularity. Not sure if I'll have time to pursue that though, or the POST functionality.

awalterschulze commented 6 years ago

I would also recommend looking into getting the filedescriptor from a grpc method and generating the form dynamically in the javascript or your frontend language of choice. I would use Elm :)

anwar-fs commented 6 years ago

Sounds like a good idea. I'm at a Typescript shop though so that would probably be my goto frontend.

awalterschulze commented 6 years ago

fair enough :)