Closed aaronschweig closed 3 years ago
Actually I mis explained problem a little 😅
We need exactly ExecuteInto
. Can you implement this named as ExecuteTo
?
Great work and thanks for support 👍
Okay, maybe i just misunderstood the issue 😃
I pushed the changes with the needed functionality 😄
Great work thanks for support 💯
What kind of change does this PR introduce?
This PR implements a new
executeTo
method which automatically parses the response into a json object as described in #7What is the current behavior?
7
What is the new behavior?
An
ExecuteTo
method was added to the structs as described which directly parses the response body into aninterface{}
Additional context
I tried to implement the changes described in the issue but was not sure regarding the requriements. I currently implemented the functions as requested with the return value of an
(interface{}, error)
for theExecuteTo
functions.I also thought about changing the function to
ExecuteTo(target interface{}) error
which enables the user to give a custom struct or map from outside. Then instead of creating a new object inside theexecuteTo
function, this target value is used to parse the response body into. I would be open to implement this function as well - maybe under a different name likeExecuteInto
As this is my first contribution, i hope i didn't miss something or did something wrong, if so please let me know so i can fix it!