# Http Polling session

**URL:** <https://community.gatling.io/t/http-polling-session/3552>\
**Category:** Gatling (Open-Source)\
**Created:** [February 10, 2017, 10:54am UTC](https://community.gatling.io/t/http-polling-session/3552 "2017-02-10T10:54:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Fryc](https://avatars.discourse-cdn.com/v4/letter/d/b5e925/32.png) [@Daniel\_Fryc](https://community.gatling.io/u/Daniel_Fryc)\
**Post date:** [February 10, 2017, 10:54am UTC](https://community.gatling.io/t/http-polling-session/3552/1 "2017-02-10T10:54:41Z")

</div>

Hi all,  
I have a scenario where I use Polling to refresh authentication token. When the token is refreshed it is returned in json response and I save this token to session. The issue is that the Polling has a separate session than user and I can’t use this value in the user sessesion. Is there any possibility to pass this value to user session? I know that when poller is stopped its session gets merged to the original session, but I don’t want the polling to stop.

`

private val pollerTokenRefresh = polling.pollerName(“TokenRefresh”)

val pollerTokenRefreshStart = pollerTokenRefresh.every(100 seconds)  
.exec(  
http("[GET] Refresh Token")  
.get("/api/${token\_endpoint}/v1/token/refresh")  
.headers(get\_json)  
.check(status.is(200))  
.check(jsonPath("$.result.token").transform(token =\> s"Bearer ${token}").saveAs(“authToken”))  
)

val pollerTokenRefreshStop = pollerTokenRefresh.stop

`

Cheers,  
Daniel
