So basically it is a Sinatra server that is using net/http ruby library for making requests. So my Sinatra application is just acting as a client and doesn't offers any UI. I have another server that is serving this client(Sinatra Application) and have a lot of endpoints(API's) that are authenticated. So I need to authenticate first to perform any subsequent requests. The authentication API is giving me session-id that is valid for 30 minutes and I have to pass this as cookie header with every subsequent request for authenticating my Sinatra Client. My question is how can I store this cookie so that I can use it for every subsequent request from Sinatra app using net/http library.