Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In instances where a single use of the client is maintained throughout the lifetime of an application, there are operations that mutate the state of the client making it unusable for future requests.
For example, when sending three SMS messages a minute apart from each other, the log output shows the following:
The issue is that when appending the path to the baseURL, it mutates the baseURL.
smsglobal-go/internal/pkg/client/client.go
Lines 68 to 69 in 4629421
This PR changes the way URL's are generated so that they are no longer mutating the client's BaseURL object.
Instead, it now creates it's own object used to create a request.