For the code given below, string receivedResponse is not assigned immediately when called from interface function. I found out that, to assign the string
receivedResponse