When using a single instance of the client across multiple requests, any SMS messages sent after the first message fail.
{"level":"debug","REST CLIENT":"Do","time":"2024-06-20T18:37:00+10:00","message":"Sending POST request to https://api.smsglobal.com/v2/sms"}
...
{"level":"debug","REST CLIENT":"Do","time":"2024-06-20T18:38:00+10:00","message":"Sending POST request to https://api.smsglobal.com/v2/sms/sms"}
...
{"level":"debug","REST CLIENT":"Do","time":"2024-06-20T18:39:00+10:00","message":"Sending POST request to https://api.smsglobal.com/v2/sms/sms/sms"}
This seems to be due to incorrectly mutated state, specifically the path, where appending "/sms" is done for each request, irrespective of it's currently stored value.
A workaround for this is to specifically set reset BaseURL before each request.
When using a single instance of the client across multiple requests, any SMS messages sent after the first message fail.
This seems to be due to incorrectly mutated state, specifically the path, where appending "/sms" is done for each request, irrespective of it's currently stored value.
A workaround for this is to specifically set reset
BaseURL
before each request.