REST and Hypermedia Web APIs such as Amazon Web Services are getting more common every day. Of course it is also common to integrate those APIs into Ruby app. There are so many HTTP clients we use for integration written in Ruby but all of them lack the feature "state management" for taking advantage of Web APIs.
I implemented the feature on Faraday, a typical HTTP client in Ruby. I'll show you the key point and the usefulness of the implementation.