We have the following Python code:
s = requests.Session()
# after we have the session, we will log in:
s.post('https://localhost/login.py', login_data)
# after logged in, we send more request...
r = s.get('https://localhost/profile_data.json', ...)
# and we can send even more request...
Now, we would like to use RestTemplate from Spring/Springboot to mimic the above workflow, i.e, use RestTemplate to create a session first, then send a post request to login, then send other needed requests... but we cannot find the correct way to do it. Could someone point a direction for us?