Closed c-s-alex closed 6 years ago
An empty string is not valid json, therefore this is not supported by twrip atm. Here is a comment from the owner of twirp which could be interesting for you: https://github.com/twitchtv/twirp/issues/42#issuecomment-359348653.
Also this issue is a duplicate of https://github.com/twitchtv/twirp/issues/42 and https://github.com/twitchtv/twirp/issues/21
Awesome framework!! 🥇 👍 👍 👍
Im new to RPC and i looked around all over and i didn't find what i was looking for so as a last resort im posting my issue here.. so please forgive me if it does not much sense.
Im having an issue with a simple .proto file i made for a hash generator API endpoint
This function generates a hash key that gets returned to the frontend and saved in a db that i use for another part of my app. How can i trigger the API without sending any JSON ... this works fine now, the only think i need to do is to send a empty json object {}
and i get my expected result
Otherwise i get this
How can i fix it in the .proto file so that the generate function's request ( Empty ) will work without an empty JSON post
Im hoping there is a easy way to do this because i don't to mess around with the .pb.go or the .twirp.go files.
Please help a newb :)