How to handel a synchronous rest calls in post function

I need to call "a synchronous " post and get calls inside post functions and listeners.

I am using scriptrunner for scripting

Did any one achieved the same or any suggestions please