Details
Description
Proposing the following improvements:
- Using url.JoinPath instead of + operator here. Current implementation may lead to incorrect path building, e.g. it cannot handle leading and trailing slashes correctly or absent of them.
- If response not in json format we cannot parse it and reporting parsing error but not the original one. So the original error cannot be found in the logs. The code
- Add more verbose debug-level logging, e.g. endpoint and body parameters.