Closed jacobat closed 5 years ago
I believe the issue is caused by these lines: https://github.com/sendgrid/ruby-http-client/blob/master/lib/ruby_http_client.rb#L215-L216
I think replacing those two lines by will fix the issue:
url_path = name ? @url_path + [name] : @url_path
Issue Summary
Reusing the Sendgrid client causes a 404.
Steps to Reproduce
If you try to reuse a client with a path multiple times it fails on subsequent attempts:
if instead you move the clients
#mail
method to be called twice things work:This is very unexpected behaviour, the code should not require you to call
mail
over an over. Instead you should be able to reuse the same client instance over and over.Technical details: