Consuming a REST Webservice (JSON-RPC) with authentication flow does not work

Hi all, I am making an app in which I want to make a connection to a website, which uses a JSON-RPC API. In this API, it is necessary to first authenticate yourself and thereafter make a specific request. I managed to make a connection to the website, which returns a correct value. However, when I want to do the next request, it says that I am not logged in anymore, so he forgets my previous connection that I set up.  How do I make sure I can send several requests in 1 session? So at the moment, everytime I have a REST Consume action, it creates a new http client, but I want to continue in the first session.
1 answers

You must keep a connection open at all times. and just reuse it on demand.
closing and opening a connection every time is costly.