I threw together a Gist describing the problem, but in sum: when I instantiate a new HyperResource instance with different headers, the effects of the headers don't take effect until I call get on the new instance.
This has a bunch of negative implications for multi-threaded applications (e.g., a Web server). (Consider the example of a memoized instance variable: @api ||= HyperResource.new(...).)
If you can point me at the code where these attributes are cached at the HyperResource class level, I can take a stab at fixing the bug.
I threw together a Gist describing the problem, but in sum: when I instantiate a new
HyperResource
instance with different headers, the effects of the headers don't take effect until I callget
on the new instance.This has a bunch of negative implications for multi-threaded applications (e.g., a Web server). (Consider the example of a memoized instance variable:
@api ||= HyperResource.new(...)
.)If you can point me at the code where these attributes are cached at the
HyperResource
class level, I can take a stab at fixing the bug.