Closed Oyabi closed 2 years ago
It offers more flexibility.
Since execute() is generic you can pass any type of object to deserialize the response to, e.g. you could deserialize to a HashMap
instead of the 'default' response for each API call. Or you could use a custom struct with only the fields you are interested in. Does this make sense?
Oh ok I get it now. Thank you very much.
I will add this as a FAQ to the README file.
Hello,
Can you explain why you're using send() and execute() method on api struct ? Why 2 method and not just one ? It seem that send() simply call execute(). I'm new to rust, something must elude me.